ld: Provide a way to make C identifier name sections GCable under __start_/__stop_ references
Fangrui Song
i@maskray.me
Sun Feb 21 19:30:58 GMT 2021
Hi! I have noticed an interesting problem with GC on C identifier name sections and just created
https://sourceware.org/bugzilla/show_bug.cgi?id=27451 .
(
More details are in a write-up:
https://maskray.me/blog/2021-01-31-metadata-sections-comdat-and-shf-link-order
You can skip the part before "Metadata sections"
)
I'll not repeat the message on the feature request. This thread is to
attract folks who don't subscribe to bug-binutils@gnu.org
The main request is that we may need a linker option (-z start-stop-gc?) to drop the original rule,
changing
__start_/__stop_ references from a live section retain all the associated C identifier name sections.
to
__start_/__stop_ references from a live section do not retain the associated C identifier name sections.
(There is a clang -fsanitize-coverage feature which demands the new behavior.
clang PGO struggled with the original rule as well. It can benefit from the new behavior, or a SHF_GROUP special
case once GNU ld implements it.)
More information about the Binutils
mailing list