[llvm-commits] [llvm] r62279 - in /llvm/trunk: docs/ include/llvm/ include/llvm/Support/ lib/Analysis/IPA/ lib/Archive/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/CodeGen/SelectionDAG/ lib/Exec

Rafael Espindola espindola at google.com
Fri Jan 16 15:10:09 PST 2009

> Unlike gold, the Darwin LD builds up the symbol table in the first pass.
> It does want to hear about all local symbols up front.
> The gold plugin filters out all the internal symbols. See line 181:
>     lto_symbol_attributes attrs = lto_module_get_symbol_attribute(cf.M, i);
>       continue;
> We could either add an LTO_SYMBOL_SCOPE_PRIVATE or just have it never
> list those symbols. Either one works for the linker, but let me ask
> this: should 'nm' list private symbols? Darwin's nm uses libLTO to when
> queried about .bc files, so if nm ought to show them, libLTO needs to
> return them and we need to add a new enum.

It should not show in nm (maybe with an extra flag, but not when
emulating a normal binary filer). It will not show in the final .o (be
it Mach-O or ELF). Private linkage is "don't tell the liker" :-)

> Nick

Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047

More information about the llvm-commits mailing list