This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] PR 21412, get_reloc_section assumes .rel/.rela name for SHT_REL/RELA.
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Sun, 23 Apr 2017 08:33:27 -0400
- Subject: [binutils-gdb] PR 21412, get_reloc_section assumes .rel/.rela name for SHT_REL/RELA.
- Authentication-results: sourceware.org; auth=none
*** 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.