diff options
author | Alan Modra <amodra@gmail.com> | 2017-04-23 11:03:34 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-04-23 20:33:34 +0930 |
commit | bce964aa6c777d236fbd641f2bc7bb931cfe4bf3 (patch) | |
tree | 0766f8772604e3f7b4df1f2dffb9ee456b9fc6f9 /bfd/elfxx-target.h | |
parent | 97e83a100aa8250be783304bfe0429761c6e6b6b (diff) | |
download | gdb-bce964aa6c777d236fbd641f2bc7bb931cfe4bf3.zip gdb-bce964aa6c777d236fbd641f2bc7bb931cfe4bf3.tar.gz gdb-bce964aa6c777d236fbd641f2bc7bb931cfe4bf3.tar.bz2 |
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.
Diffstat (limited to 'bfd/elfxx-target.h')
-rw-r--r-- | bfd/elfxx-target.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h index 6cc9f3f..2551267 100644 --- a/bfd/elfxx-target.h +++ b/bfd/elfxx-target.h @@ -715,7 +715,7 @@ #endif #ifndef elf_backend_get_reloc_section -#define elf_backend_get_reloc_section _bfd_elf_get_reloc_section +#define elf_backend_get_reloc_section _bfd_elf_plt_get_reloc_section #endif #ifndef elf_backend_copy_special_section_fields |