]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ld: Clear map_head_is_link_order for .gnu_object_only
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 13 Jul 2025 21:21:32 +0000 (05:21 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 14 Jul 2025 01:12:38 +0000 (09:12 +0800)
commit939eb467b21de5d18ee703755fb9704a525cfe21
tree4a59657e2d103163aa2460ab737d8d14978a7ad8
parenta57a3a169ea9ec79977949c9c8dccd3a2a615fae
ld: Clear map_head_is_link_order for .gnu_object_only

Clear map_head_is_link_order when generating .gnu_object_only section so
that lang_add_section can add new sections and .sframe sections will be
properly merged by _bfd_elf_merge_section_sframe.

PR ld/33146
* ldlang.c (cmdline_emit_object_only_section): Clear
map_head_is_link_order.
* testsuite/ld-plugin/lto.exp (as_gsframe): New.
(lto_link_tests): Add $as_gsframe to compile lto-4b.o and
lto-4c.o.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
ld/ldlang.c
ld/testsuite/ld-plugin/lto.exp