mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 09:08:59 +00:00
Fix duplicate output section statement lookup
Tie output section statements to their associated output section via output section userdata. This allows us to avoid hash lookups which are slower and fail when multiple output sections have the same name. * ldlang.h (lang_output_section_get): Define. * ldlang.c (lang_output_section_get): Likewise. (init_os): Set the output_section userdata to the output section statement. * emultempl/hppaelf.em: Use lang_output_section_get instead of lang_output_section_find where applicable. * emultempl/aarch64elf.em: Likewise. * emultempl/aix.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/metagelf.em: Likewise. * emultempl/mipself.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/spuelf.em: Likewise.
This commit is contained in:
@@ -584,6 +584,8 @@ extern lang_input_statement_type *lang_add_input_file
|
||||
(const char *, lang_input_file_enum_type, const char *);
|
||||
extern void lang_add_keepsyms_file
|
||||
(const char *);
|
||||
extern lang_output_section_statement_type *lang_output_section_get
|
||||
(const asection *);
|
||||
extern lang_output_section_statement_type *lang_output_section_statement_lookup
|
||||
(const char *, int, bfd_boolean);
|
||||
extern lang_output_section_statement_type *next_matching_output_section_statement
|
||||
|
||||
Reference in New Issue
Block a user