[PATCH] D96753: [lld][ELF] Don't consider C identifier-named sections as GC roots

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 00:51:06 PST 2021


MaskRay added a comment.

I actually want to get rid of the "C identifier name sections have GC root semantics" https://maskray.me/blog/2021-01-31-metadata-sections-comdat-and-shf-link-order#c-identifier-name-sections
See also https://sourceware.org/bugzilla/show_bug.cgi?id=27259#c9 . I started a generic-abi thread as Alan Modra requested.
I would sent a patch like this as well but I am waiting for some feedback.

If we have had SHF_GNU_RETAIN earlier, we would not have needed the special case. Do you know what sections we may break by requiring `isValidCIdentifier(sec->name) && (sec->flags & SHF_GNU_RETAIN)`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96753/new/

https://reviews.llvm.org/D96753



More information about the llvm-commits mailing list