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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 8 09:51:13 PST 2021


MaskRay added a comment.

In D96914#3115794 <https://reviews.llvm.org/D96914#3115794>, @tstellar wrote:

> What are the downsides of reverting 6d2d3bd0a61f5fc7fd9f61f48bc30e9ca77cc619 <https://reviews.llvm.org/rG6d2d3bd0a61f5fc7fd9f61f48bc30e9ca77cc619> ?

@tstellar Various metadata section users will get affected because they will see unneeded size increase.
Such users typically use Clang solely and use the main branch so if you keep the revert to release/13.x branch, that'll be fine.
Another disadvantage is that more software can incorrectly leverage the `-z nostart-stop-gc` behavior before LLD 14.0.0 comes out. There is a risk dealing with more software for LLD 14.0.0.

People objecting here neglected the point that the GNU ld behavior was also new 2015-10.
Its traditional behavior was the same as the `-z start-stop-gc` default.

@theraven My point is based on many conditions: the adoption of the C identifier name section, how likely the 2015-10 GNU ld behavior may be exploited by newer software, the GNU ld traditional behavior, Mach-O ld64 behavior, , etc.
It's not that I think we should have an unneeded "version lockstep".

That said, I have spent so many hours on what I could use for more productive things. @tstellar if the revert is release/13.x only, I am fine.
We just take the risk to deal with more software leveraging the new GNU ld behavior when LLD 14.0.0 comes out.


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