[binutils-gdb] PR 21412, get_reloc_section assumes .rel/.rela name for SHT_REL/RELA.
sergiodj+buildbot@sergiodj.net
sergiodj+buildbot@sergiodj.net
Sun Apr 23 12:33:00 GMT 2017
*** TEST RESULTS FOR COMMIT bce964aa6c777d236fbd641f2bc7bb931cfe4bf3 ***
Author: Alan Modra <amodra@gmail.com>
Branch: master
Commit: bce964aa6c777d236fbd641f2bc7bb931cfe4bf3
PR 21412, get_reloc_section assumes .rel/.rela name for SHT_REL/RELA.
This patch fixes an assumption made by code that runs for objcopy and
strip, that SHT_REL/SHR_RELA sections are always named starting with a
.rel/.rela prefix. I'm also modifying the interface for
elf_backend_get_reloc_section, so any backend function just needs to
handle name mapping.
PR 21412
* elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
parameters and comment.
(_bfd_elf_get_reloc_section): Delete.
(_bfd_elf_plt_get_reloc_section): Declare.
* elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
New functions. Don't blindly skip over assumed .rel/.rela prefix.
Extracted from..
(_bfd_elf_get_reloc_section): ..here. Delete.
(assign_section_numbers): Call elf_get_reloc_section.
* elf64-ppc.c (elf_backend_get_reloc_section): Define.
* elfxx-target.h (elf_backend_get_reloc_section): Update.
More information about the Gdb-testers
mailing list