https://sourceware.org/bugzilla/show_bug.cgi?id=21557
--- Comment #4 from Alexander Monakov <amonakov at gmail dot com> ---
> Please open a new bug report.
Done, bug 21562.
Now I see that to use __start_SCN together with linker scripts and
--gc-sections, one should put the PROVIDE statement inside of the output
section declaration:
SECTIONS {
scnfoo : {
PROVIDE_HIDDEN(__start_scnfoo = .);
*(scnfoo)
}
}
This looks logical and seems to work with -gc-sections, with both ld.bfd and
Gold. I think the Glibc approach quoted in comment #0 with PROVIDE statements
outside of output groups sets a bad example (and breaks build with
--gc-sections).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils