[PATCH] D96914: [ELF] Don't let __start_/__stop_ retain C identifier name sections

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 22:26:57 PST 2021


phosek added a comment.

Personally, I'm really not a fan of hardcoding/special casing names of internal symbols from `libclang_rt.profile` and I'd prefer a more generic solution like `SHF_GNU_RETAIN`.

I understand that there would be an issue when you try to link `libclang_rt.profile` that was compiled by an older GCC/Clang (which doesn't support `SHF_GNU_RETAIN`) using the latest lld, but I'm not sure if that's a use case we want to support. This was discussed several times in the past, and the conclusion has always been that you should either use the in-tree Clang to build runtimes, or that you should build runtimes separately from the compiler in which case you need to configure the build appropriately.

We could introduce an additional option in the compiler-rt profile build for that purpose which would enable/disable the use of the `.data.PERSIST_SIG` trick (used by AFL) as one potential solution for older compilers.


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