diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2007-03-14 02:56:45 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2007-03-14 02:56:45 +0000 |
commit | d1036acbe72ee838ccf0c876be94884246589641 (patch) | |
tree | 760f152471afeae4adb28cfd3acbf31aaa5ab5b9 /bfd/elf64-hppa.c | |
parent | 0e0cefcbabaf5c324266363727adc8c9f6559990 (diff) | |
download | gdb-d1036acbe72ee838ccf0c876be94884246589641.zip gdb-d1036acbe72ee838ccf0c876be94884246589641.tar.gz gdb-d1036acbe72ee838ccf0c876be94884246589641.tar.bz2 |
2007-03-13 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/3826
* elf-bfd.h (elf_backend_data): Add elf_osabi.
(_bfd_elf_set_osabi): New.
* elf.c (_bfd_elf_set_osabi): New.
* elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
(ELF_OSABI): Properly defined for each target.
* elf32-i370.c (i370_elf_post_process_headers): Removed.
(ELF_OSABI): Defined.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
* elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
freebsd.
(elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
* elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
(ELF_OSABI): Defined.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
* elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
freebsd.
(elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
elf_osabi.
* elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
with elf_osabi.
(ELF_OSABI): Properly defined for each target.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi for Linux.
* elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
(ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
* elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
(ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
(elf_backend_post_process_headers): Defined with
_bfd_elf_set_osabi.
* elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
with any ELF target of the compatible machine for which we do not
have a specific backend.
* elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
with elf_osabi.
* elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
(elfNN_bed): Initialize elf_osabi with ELF_OSABI.
Diffstat (limited to 'bfd/elf64-hppa.c')
-rw-r--r-- | bfd/elf64-hppa.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 675b02b..8e7e9d1 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -1198,16 +1198,9 @@ elf64_hppa_post_process_headers (abfd, link_info) Elf_Internal_Ehdr * i_ehdrp; i_ehdrp = elf_elfheader (abfd); - - if (strcmp (bfd_get_target (abfd), "elf64-hppa-linux") == 0) - { - i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_LINUX; - } - else - { - i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX; - i_ehdrp->e_ident[EI_ABIVERSION] = 1; - } + + i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi; + i_ehdrp->e_ident[EI_ABIVERSION] = 1; } /* Create function descriptor section (.opd). This section is called .opd @@ -2800,6 +2793,8 @@ const struct elf_size_info hppa64_elf_size_info = /* This is not strictly correct. The maximum page size for PA2.0 is 64M. But everything still uses 4k. */ #define ELF_MAXPAGESIZE 0x1000 +#define ELF_OSABI ELFOSABI_HPUX + #define bfd_elf64_bfd_reloc_type_lookup elf_hppa_reloc_type_lookup #define bfd_elf64_bfd_is_local_label_name elf_hppa_is_local_label_name #define elf_info_to_howto elf_hppa_info_to_howto @@ -2874,6 +2869,10 @@ const struct elf_size_info hppa64_elf_size_info = #define TARGET_BIG_SYM bfd_elf64_hppa_linux_vec #undef TARGET_BIG_NAME #define TARGET_BIG_NAME "elf64-hppa-linux" +#undef ELF_OSABI +#define ELF_OSABI ELFOSABI_LINUX +#undef elf_backend_post_process_headers +#define elf_backend_post_process_headers _bfd_elf_set_osabi #undef elf64_bed #define elf64_bed elf64_hppa_linux_bed |