[PATCH] D43361: [ThinLTO] Enable AutoHide on symbols with local_unnamed_addr
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 15 18:28:39 PST 2018
pcc added a comment.
> There is an alternative which is to teach linker to deduct auto hide property from the bitcode file and overwrite the linkage type afterwards. For C API, there is a new scope LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN can be used to do that but that will be forced the work onto all the linker which is probably not desirable but it solves the same problem.
This seems better to me. Ideally the linker should be reading and resolving symbols from bitcode files in the same way as regular object files, including the auto-hide bit. Linkers would need something similar for any other properties that are contained only in bitcode files but not in object files (such as a general address-taken bit).
Repository:
rL LLVM
https://reviews.llvm.org/D43361
More information about the llvm-commits
mailing list