mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 02:24:46 +08:00
bfd:
* config.bfd (hppa*-*-netbsd*): Set targ_defvec to bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec to targ_selvecs. * configure.in (bfd_elf32_hppa_nbsd_vec): Add case. * configure: Regenerate. * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd" case that accepts OSABI=NetBSD and OSABI=SysV. (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to the base of .got or .data (if .got does not exist). (elf32_hppa_post_process_headers): For elf32-hppa-netbsd, set OSABI=NetBSD. (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case. (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case. * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration. (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec. gas: * config/tc-hppa.h (TARGET_FORMAT): Set to "elf32-hppa-netbsd" for TE_NetBSD. ld: * emulparams/hppanbsd.sh (OUTPUT_FORMAT): Set to "elf32-hppa-netbsd".
This commit is contained in:
parent
1bec8141aa
commit
225247f09f
@ -1,3 +1,20 @@
|
||||
2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
|
||||
* config.bfd (hppa*-*-netbsd*): Set targ_defvec to
|
||||
bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
|
||||
to targ_selvecs.
|
||||
* configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
|
||||
* configure: Regenerate.
|
||||
* elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
|
||||
case that accepts OSABI=NetBSD and OSABI=SysV.
|
||||
(elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
|
||||
the base of .got or .data (if .got does not exist).
|
||||
(elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
|
||||
set OSABI=NetBSD.
|
||||
(TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
|
||||
(TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
|
||||
* targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
|
||||
(_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
|
||||
|
||||
2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR 161/251
|
||||
|
596
bfd/configure
vendored
596
bfd/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -598,6 +598,7 @@ do
|
||||
bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
|
||||
bfd_elf32_i386_freebsd_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
|
||||
|
@ -901,6 +901,14 @@ elf32_hppa_object_p (bfd *abfd)
|
||||
i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
|
||||
return FALSE;
|
||||
}
|
||||
else if (strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") == 0)
|
||||
{
|
||||
/* GCC on hppa-netbsd produces binaries with OSABI=NetBSD,
|
||||
but the kernel produces corefiles with OSABI=SysV. */
|
||||
if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NETBSD &&
|
||||
i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_HPUX)
|
||||
@ -2899,7 +2907,8 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info)
|
||||
if either the .plt or .got is larger than 0x2000. If both
|
||||
the .plt and .got are smaller than 0x2000, choose the end of
|
||||
the .plt section. */
|
||||
sec = splt;
|
||||
sec = strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") == 0
|
||||
? NULL : splt;
|
||||
if (sec != NULL)
|
||||
{
|
||||
gp_val = sec->size;
|
||||
@ -2913,10 +2922,13 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info)
|
||||
sec = sgot;
|
||||
if (sec != NULL)
|
||||
{
|
||||
/* We know we don't have a .plt. If .got is large,
|
||||
offset our LTP. */
|
||||
if (sec->size > 0x2000)
|
||||
gp_val = 0x2000;
|
||||
if (strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") != 0)
|
||||
{
|
||||
/* We know we don't have a .plt. If .got is large,
|
||||
offset our LTP. */
|
||||
if (sec->size > 0x2000)
|
||||
gp_val = 0x2000;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -4116,6 +4128,10 @@ elf32_hppa_post_process_headers (bfd *abfd,
|
||||
{
|
||||
i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX;
|
||||
}
|
||||
else if (strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") == 0)
|
||||
{
|
||||
i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_NETBSD;
|
||||
}
|
||||
else
|
||||
{
|
||||
i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX;
|
||||
@ -4185,3 +4201,10 @@ elf32_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
|
||||
|
||||
#define INCLUDED_TARGET_FILE 1
|
||||
#include "elf32-target.h"
|
||||
|
||||
#undef TARGET_BIG_SYM
|
||||
#define TARGET_BIG_SYM bfd_elf32_hppa_nbsd_vec
|
||||
#undef TARGET_BIG_NAME
|
||||
#define TARGET_BIG_NAME "elf32-hppa-netbsd"
|
||||
|
||||
#include "elf32-target.h"
|
||||
|
@ -546,6 +546,7 @@ extern const bfd_target bfd_elf32_frv_vec;
|
||||
extern const bfd_target bfd_elf32_frvfdpic_vec;
|
||||
extern const bfd_target bfd_elf32_h8300_vec;
|
||||
extern const bfd_target bfd_elf32_hppa_linux_vec;
|
||||
extern const bfd_target bfd_elf32_hppa_nbsd_vec;
|
||||
extern const bfd_target bfd_elf32_hppa_vec;
|
||||
extern const bfd_target bfd_elf32_i370_vec;
|
||||
extern const bfd_target bfd_elf32_i386_freebsd_vec;
|
||||
@ -841,6 +842,7 @@ static const bfd_target * const _bfd_target_vector[] = {
|
||||
&bfd_elf32_frvfdpic_vec,
|
||||
&bfd_elf32_h8300_vec,
|
||||
&bfd_elf32_hppa_linux_vec,
|
||||
&bfd_elf32_hppa_nbsd_vec,
|
||||
&bfd_elf32_hppa_vec,
|
||||
&bfd_elf32_i370_vec,
|
||||
&bfd_elf32_i386_freebsd_vec,
|
||||
|
@ -55,13 +55,17 @@
|
||||
#endif
|
||||
#else /* TARGET_ARCH_SIZE == 32 */
|
||||
#include "bfd/elf32-hppa.h"
|
||||
#if defined (TE_LINUX) || defined (TE_NetBSD)
|
||||
#if defined (TE_LINUX)
|
||||
#define TARGET_FORMAT "elf32-hppa-linux"
|
||||
#else
|
||||
#if defined (TE_NetBSD)
|
||||
#define TARGET_FORMAT "elf32-hppa-netbsd"
|
||||
#else
|
||||
#define TARGET_FORMAT "elf32-hppa"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef OBJ_SOM
|
||||
#include "bfd/som.h"
|
||||
|
@ -3,3 +3,4 @@
|
||||
|
||||
. ${srcdir}/emulparams/hppalinux.sh
|
||||
|
||||
OUTPUT_FORMAT="elf32-hppa-netbsd"
|
||||
|
Loading…
Reference in New Issue
Block a user