mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 05:52:21 +08:00
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.
This commit is contained in:
@ -1503,6 +1503,12 @@ struct elf_backend_data
|
||||
/* Opcode representing no unwind. */
|
||||
int (*cant_unwind_opcode) (struct bfd_link_info *);
|
||||
|
||||
/* Called when emitting an ELF symbol whoes input version had an
|
||||
ST_SHNDX field set to a value in the range SHN_LOPROC..SHN_HIOS.
|
||||
Returns the value to be installed in the ST_SHNDX field of the
|
||||
emitted symbol. If not defined, the value is left unchanged. */
|
||||
unsigned int (*symbol_section_index) (bfd *, elf_symbol_type *);
|
||||
|
||||
/* This is non-zero if static TLS segments require a special alignment. */
|
||||
unsigned static_tls_alignment;
|
||||
|
||||
|
Reference in New Issue
Block a user