[llvm-commits] [llvm] r78872 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp

Dale Johannesen dalej at apple.com
Sun Aug 23 15:15:36 PDT 2009


On Aug 23, 2009, at 2:15 PM, Chris Lattner wrote:
>
> However, it looks like the linker doesn't reject two .o files that
> contain redefinitions of the same label with either -r or -dylib.  I
> tried linking together two .o files that contained this .s file:
>
> lFoo:
>   .byte 1
>
> Shouldn't I get a redefinition error?  Is the weak merging semantics
> just a special case magic behavior that is unlike normal strong  
> symbols?

Assembler symbols are not globl or private_extern unless you so  
declare them.  This is the equivalent of compiling "static Foo"  
twice.  If you add private_extern, as in my original example, you do  
get a link error.




More information about the llvm-commits mailing list