[PATCH] D96914: [ELF] Add -z start-stop-gc to let __start_/__stop_ not retain C identifier name sections
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 12 12:03:09 PST 2021
jrtc27 added a comment.
In D96914#3128133 <https://reviews.llvm.org/D96914#3128133>, @hvdijk wrote:
> 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`?
What the warning suggests as a fix is entirely TBD; can suggest any and all of source, codegen and linker flag changes
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