diff options
author | Nick Clifton <nickc@redhat.com> | 2020-02-20 13:08:29 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-02-20 13:08:29 +0000 |
commit | 00e49dff20421e0f8f28ee74cec12a0bae8f1b82 (patch) | |
tree | b5ad074f9e41fd5fdcdfae88cfac0c517b4a79f8 /bfd/elfxx-target.h | |
parent | d13c7322fe1266984024644154003a19664610ea (diff) | |
download | gdb-00e49dff20421e0f8f28ee74cec12a0bae8f1b82.zip gdb-00e49dff20421e0f8f28ee74cec12a0bae8f1b82.tar.gz gdb-00e49dff20421e0f8f28ee74cec12a0bae8f1b82.tar.bz2 |
Stop the BFD library from automatically converting OS and PROC specific symbol section indicies to SHN_ABS, and provide a hook for backends to decide how such indicies should be processed.
* elf-bfd.h (struct elf_backend_data): Add symbol_section_index
callback.
* elfxx-target.h (elf_backend_symbol_section_index): Provide
default definition.
(elfNN_bed): Initialise the symbol_section_index field.
* elf.c (swap_out_syms): Call symbol_section_index, if defined, on
OS and PROC specific section indicies. Warn if converting other
reserved incidies to SHN_ABS.
Diffstat (limited to 'bfd/elfxx-target.h')
-rw-r--r-- | bfd/elfxx-target.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h index caca83f..e9cac0a 100644 --- a/bfd/elfxx-target.h +++ b/bfd/elfxx-target.h @@ -769,6 +769,10 @@ #define elf_backend_cant_unwind_opcode 0 #endif +#ifndef elf_backend_symbol_section_index +#define elf_backend_symbol_section_index NULL +#endif + #ifndef elf_match_priority #define elf_match_priority \ (ELF_ARCH == bfd_arch_unknown ? 2 : ELF_OSABI == ELFOSABI_NONE ? 1 : 0) @@ -895,6 +899,7 @@ static struct elf_backend_data elfNN_bed = elf_backend_fixup_gnu_properties, elf_backend_compact_eh_encoding, elf_backend_cant_unwind_opcode, + elf_backend_symbol_section_index, elf_backend_static_tls_alignment, elf_backend_stack_align, elf_backend_strtab_flags, |