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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 19:17:11 PDT 2017


tejohnson 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.


I don't see how to get the presence of a section or the section name for a symbol when walking the symbols? I.e. either in gold-plugin via the symbol info from the linker, or in LTO::addModuleToGlobalRes via the InputFile:Symbol?


https://reviews.llvm.org/D35639





More information about the llvm-commits mailing list