[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 17:02:47 PDT 2018


steven_wu added a comment.

I might have missed something. Can you be more specific about how it is going to work?

Let's say IRSymtab has symbol "_foo" and it is weak and it can be omitted from symbol table. After LTO codegen, linker sees that "_foo" is weak in the object file without "auto hide" attribute. How can linker figure out if it should hide the symbol or not?

Actually, how does ELF/COFF linker know that if LTO decides to drop local_unnamed_addr (since only macho has flags to indicate that)? Is lld/gold looking at the object file to figure out if there are uses for the addr for this symbol?


Repository:
  rL LLVM

https://reviews.llvm.org/D43361





More information about the llvm-commits mailing list