[PATCH] D43361: [ThinLTO] Enable AutoHide on symbols with local_unnamed_addr
Steven Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 15 16:39:15 PDT 2018
steven_wu added a comment.
> The solution is to use canBeOmittedFromSymbolTable from include/llvm/Object/IRSymtab.h.
>
> The symbol table is computed earlier and so the above predicate still returns 1. Your examples work with lld and ThinLTO if you want to check the implementation details.
It is easy to get 1 correct. This patch is to get 2 to be hidden using LTO.
Sure, linker can consult the symbol table in IRSymtab but the problem is how much can it be trusted? LTO can already add/remove symbols from IRSymtab. Is changing symbol linkage/visibility legal during LTO?
Repository:
rL LLVM
https://reviews.llvm.org/D43361
More information about the llvm-commits
mailing list