forked from Imagelibrary/binutils-gdb
Re: Orphan output section with multiple input sections
The last patch missed handling the case where the ideal place to put
an orphan was after a non-existent output section statement, as can
happen when not using the builtin linker scripts. This patch uses the
updated flags for that case too, and extends the support to mmo and pe.
PR ld/19162
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Pass
updated flags to lang_output_section_find_by_flags.
* emultempl/mmo.em (mmo_place_orphan): Merge flags for any
other input sections that might match a new output section to
decide placement.
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
* emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
* ldlang.c (lang_output_section_find_by_flags): Add sec_flags param.
* ldlang.h (lang_output_section_find_by_flags): Update prototype.
This commit is contained in:
@@ -592,7 +592,7 @@ extern void lang_process
|
||||
extern void ldlang_add_file
|
||||
(lang_input_statement_type *);
|
||||
extern lang_output_section_statement_type *lang_output_section_find_by_flags
|
||||
(const asection *, lang_output_section_statement_type **,
|
||||
(const asection *, flagword, lang_output_section_statement_type **,
|
||||
lang_match_sec_type_func);
|
||||
extern lang_output_section_statement_type *lang_insert_orphan
|
||||
(asection *, const char *, int, lang_output_section_statement_type *,
|
||||
|
||||
Reference in New Issue
Block a user