Duplicate output sections in scripts
authorAlan Modra <amodra@gmail.com>
Tue, 24 Nov 2020 13:11:31 +0000 (23:41 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 25 Nov 2020 08:43:51 +0000 (19:13 +1030)
commit21401fc7bf67dbf73f4a3eda4bcfc58fa4211584
treee3c07e14b0b760173b5abeb0269a191352cec45e
parent6595cf3ce81572a8941bd9d16d6518091e6e6937
Duplicate output sections in scripts

Previously, ld merged duplicate output sections if such existed in
scripts, except for those with a constraint of SPECIAL.  This makes
scripts with duplicate output section statements create duplicate
output sections in the linker output file.

* ldlang.c (lang_output_section_statement_lookup): Change "create"
parameter to a tristate, if 2 then always create a new output
section statement.  Update all callers, with
lang_enter_output_section_statement using "2".
(map_input_to_output_sections): Don't ignore SPECIAL constraint
here.
* ldlang.h (lang_output_section_statement_type): Update prototype.
(lang_output_section_find): Update.
ld/ChangeLog
ld/ldlang.c
ld/ldlang.h