[llvm-commits] [llvm] r76385 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/Linker/ lib/Target/ lib/Target/ARM/AsmPrinter/ lib/Target/Alpha/AsmPrinter/ lib/Target/CellSPU/AsmPrinter/ lib/Target/CppBackend/ lib/Target/IA64/AsmPrinter/ lib/Target/MSP430/ lib/Target/Mips/AsmPrinter/ lib/Target/PowerPC/AsmPrinter/ lib/Target/Sparc/AsmPrinter/ lib/Target/SystemZ/AsmPrinter/ lib/Target/X86/AsmPrinter/ lib/Target/XCore/ lib/Tr...
Chris Lattner
clattner at apple.com
Sun Jul 19 22:19:13 PDT 2009
On Jul 19, 2009, at 10:01 PM, Bill Wendling wrote:
> On Jul 19, 2009, at 9:29 PM, Duncan Sands wrote:
>
>> Hi Bill,
>>
>>> Add plumbing for the `linker_private' linkage type. This type is
>>> meant for
>>> "private" symbols which the assember shouldn't strip, but which the
>>> linker may
>>> remove after evaluation. This is mostly useful for Objective-C
>>> metadata.
>>
>> is it really necessary to have both "private" and "linker_private"
>> linkage? What's the difference between them exactly?
>>
> My understanding is that "private" allows the assembler to strip the
> symbols. But "linker_private" only allows the linker to strip the
> symbols (the assembler must assume that they're used). Basically, the
> linker uses a bunch of "l_OBJC_*" symbols (as opposed to "L_OBJC_*"
> symbols) when performing linking. Yes, it's really the difference
> between an 'l' and 'L' prefix on symbols. :-)
Right. Private linkage is discarded by the assembler, so they never
make it into the .o file. linker_private is discarded by the linker,
so it never makes it into the .exe/.dylib. I don't think there is a
corresponding idea on ELF, so on ELF they two linkage types should be
codegen'd the same way.
-Chris
More information about the llvm-commits
mailing list