[PATCH] D35639: [ThinLTO] Prevent dead stripping and internalization of symbols with sections

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 14:49:45 PDT 2017


davide added a comment.

In https://reviews.llvm.org/D35639#815234, @pcc wrote:

> Another possibility is to handle this in the client (i.e. the linker) instead. The client has the best idea of whether a given section is a GC root; ELF linkers can set VisibleToRegularObj on any symbol in a section named like a C identifier, and other linkers can do whatever is appropriate for their object format.


That makes sense to me. This kind of goes against the principles of the API as we're going to duplicate this at least between lld and gold, but I don't think it's unreasonable.
In particular, this seems ELF-specific so other formats might not really care, therefore the client seems to be the most obvious choice.


https://reviews.llvm.org/D35639





More information about the llvm-commits mailing list