[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
Sat Oct 30 16:41:15 PDT 2021


MaskRay added a comment.

In D96914#3098705 <https://reviews.llvm.org/D96914#3098705>, @hvdijk wrote:

> That followup 6d2d3bd0a61f5fc7fd9f61f48bc30e9ca77cc619 <https://reviews.llvm.org/rG6d2d3bd0a61f5fc7fd9f61f48bc30e9ca77cc619> gives off the impression that aside from systemd, nothing else would be broken by the change. That is incorrect, enough time has passed since the traditional GNU ld behaviour was ubiquitous that more software has started relying on the new GNU ld behaviour, and lld 13 breaks at least NetworkManager too. (I have reported this to NetworkManager.) What's the right thing to do here?

Thanks for reporting the bug to NetworkManager.

> At the very least, I think the release notes simply listing this as an improvement rather than as a breaking change is not enough info for users to beware that their code may need updating, but depending on whether the breakage affects enough other software, maybe it should be reverted on the 13.x branch as well?

No, I don't think the additional report from NetworkManager is sufficient to justify restoring the GNU ld buggy behavior.

NetworkManager can either fix their code or not use `-Wl,--gc-sections`.


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