PR27100, final link failed: bad value
authorAlan Modra <amodra@gmail.com>
Thu, 24 Dec 2020 05:26:23 +0000 (15:56 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 24 Dec 2020 12:28:03 +0000 (22:58 +1030)
commitde34d42812a0b978b278cd344abeaee7c71fa55c
tree3ce14917aa8bf1a4949291d3b4db89f8a42da4df
parent62fa7b3c6a7bca91df55cf520a97cb047070a475
PR27100, final link failed: bad value

The failure on this PR is due to using the same bfd section for
multiple output sections.  Commit 21401fc7bf67 managed to create
duplicate linker script output section statements, but not the actual
bfd sections.

PR 27100
* ldlang.h (lang_output_section_statement_type): Add dup_output.
* ldlang.c (lang_output_section_statement_lookup): Set dup_output.
(init_os): Test dup_output rather than constraint.
* testsuite/ld-scripts/pr27100.d,
* testsuite/ld-scripts/pr27100.s,
* testsuite/ld-scripts/pr27100.t: New test.
* testsuite/ld-scripts/data.exp: Run it.  Don't exclude aout here.
* testsuite/ld-scripts/data.d: Do so here instead.
* testsuite/ld-scripts/fill.d: Likewise.
* testsuite/ld-scripts/fill16.d: Likewise.
ld/ChangeLog
ld/ldlang.c
ld/ldlang.h
ld/testsuite/ld-scripts/data.d
ld/testsuite/ld-scripts/data.exp
ld/testsuite/ld-scripts/fill.d
ld/testsuite/ld-scripts/fill16.d
ld/testsuite/ld-scripts/pr27100.d [new file with mode: 0644]
ld/testsuite/ld-scripts/pr27100.s [new file with mode: 0644]
ld/testsuite/ld-scripts/pr27100.t [new file with mode: 0644]