[PATCH] D96914: [ELF] Add -z start-stop-gc to let __start_/__stop_ not retain C identifier name sections

Harald van Dijk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 12:00:24 PST 2021


hvdijk added a comment.

In D96914#3128079 <https://reviews.llvm.org/D96914#3128079>, @jrtc27 wrote:

> So spit out a warning that the default is going to change if we detect --gc-sections + __start_/__stop_ symbols + no explicit -z (no)start-stop-gc? That's probably a good idea to do regardless.

That's a good idea when dealing with older compilers, but when up-to-date compilers are used, it would be nice if no warnings are emitted, as with up-to-date compilers in my opinion it's the code that should be changed as needed rather than the invocation. Is there a reliable way to tell that an object file was created using `SHF_GNU_RETAIN`-aware tools, regardless of whether the object file actually uses `SHF_GNU_RETAIN`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96914



More information about the llvm-commits mailing list