diff options
author | Nick Clifton <nickc@redhat.com> | 2016-04-29 09:24:42 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-04-29 09:24:42 +0100 |
commit | 5522f910cb539905d6adfdceab208ddfa5e84557 (patch) | |
tree | 0e266a54bdd71c153b10e11319699d78350b6c33 /bfd/elf32-sparc.c | |
parent | 2deb93c7a7708ed164e4b10afb9d6a885d4615c6 (diff) | |
download | binutils-5522f910cb539905d6adfdceab208ddfa5e84557.zip binutils-5522f910cb539905d6adfdceab208ddfa5e84557.tar.gz binutils-5522f910cb539905d6adfdceab208ddfa5e84557.tar.bz2 |
Enhance support for copying and stripping Solaris and ARM binaries.
PR 19938
bfd * elf-bfd.h (struct elf_backend_data): Rename
elf_backend_set_special_section_info_and_link to
elf_backend_copy_special_section_fields.
* elfxx-target.h: Likewise.
* elf.c (section_match): Ignore the SHF_INFO_LINK flag when
comparing section flags.
(copy_special_section_fields): New function.
(_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
Perform two scans over special sections. The first one looks for
a direct mapping between the output section and an input section.
The second scan looks for a possible match based upon section
characteristics.
* elf32-arm.c (elf32_arm_copy_special_section_fields): New
function. Handle setting the sh_link field of SHT_ARM_EXIDX
sections.
* elf32-i386.c (elf32_i386_set_special_info_link): Rename to
elf32_i386_copy_solaris_special_section_fields.
* elf32-sparc.c (elf32_sparc_set_special_section_info_link):
Rename to elf32_sparc_copy_solaris_special_section_fields.
* elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
elf64_x86_64_copy_solaris_special_section_fields.
binutils* readelf.c (get_solaris_segment_type): New function.
(get_segment_type): Call it.
Diffstat (limited to 'bfd/elf32-sparc.c')
-rw-r--r-- | bfd/elf32-sparc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c index c045854..495d55a 100644 --- a/bfd/elf32-sparc.c +++ b/bfd/elf32-sparc.c @@ -265,18 +265,18 @@ elf32_sparc_add_symbol_hook (bfd * abfd, #define elf_backend_strtab_flags SHF_STRINGS static bfd_boolean -elf32_sparc_set_special_info_link (const bfd *ibfd ATTRIBUTE_UNUSED, - bfd *obfd ATTRIBUTE_UNUSED, - const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED, - Elf_Internal_Shdr *osection ATTRIBUTE_UNUSED) +elf32_sparc_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, + bfd *obfd ATTRIBUTE_UNUSED, + const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED, + Elf_Internal_Shdr *osection ATTRIBUTE_UNUSED) { /* PR 19938: FIXME: Need to add code for setting the sh_info and sh_link fields of Solaris specific section types. */ return FALSE; } -#undef elf_backend_set_special_section_info_and_link -#define elf_backend_set_special_section_info_and_link elf32_sparc_set_special_info_link +#undef elf_backend_copy_special_section_fields +#define elf_backend_copy_special_section_fields elf32_sparc_copy_solaris_special_section_fields #include "elf32-target.h" @@ -341,7 +341,7 @@ elf32_sparc_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker) elf32_sparc_vxworks_final_write_processing #undef elf_backend_static_tls_alignment #undef elf_backend_strtab_flags -#undef elf_backend_set_special_section_info_and_link +#undef elf_backend_copy_special_section_fields #undef elf32_bed #define elf32_bed sparc_elf_vxworks_bed |