diff options
author | Paul Brook <paul@codesourcery.com> | 2004-12-02 15:05:34 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2004-12-02 15:05:34 +0000 |
commit | 3a624f4e3d9811105821a639eae2c2f08ef9b894 (patch) | |
tree | c0e6b8776d53544bdd5a26c6bb16ce02d0e891bb | |
parent | b2e517ef36a1d767fe584db92f76678ffbe2d73b (diff) | |
download | gdb-3a624f4e3d9811105821a639eae2c2f08ef9b894.tar.gz |
2004-12-01 Paul Brook <paul@codesourcery.com>
* elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
(elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
version.
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dc0d93308df..699732418c8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2004-12-01 Paul Brook <paul@codesourcery.com> + * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI. + (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI + version. + +2004-12-01 Paul Brook <paul@codesourcery.com> + * elflink.c (elf_link_add_object_symbols): Make symbols from discarded sections undefined. diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 0b031e0a08b..325d2e86251 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -3428,6 +3428,10 @@ elf32_arm_copy_private_bfd_data (bfd *ibfd, bfd *obfd) elf_elfheader (obfd)->e_flags = in_flags; elf_flags_init (obfd) = TRUE; + /* Also copy the EI_OSABI field. */ + elf_elfheader (obfd)->e_ident[EI_OSABI] = + elf_elfheader (ibfd)->e_ident[EI_OSABI]; + return TRUE; } @@ -5352,7 +5356,10 @@ elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT i_ehdrp = elf_elfheader (abfd); - i_ehdrp->e_ident[EI_OSABI] = ARM_ELF_OS_ABI_VERSION; + if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_UNKNOWN) + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_ARM; + else + i_ehdrp->e_ident[EI_OSABI] = 0; i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION; if (link_info) |