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

Chris Lattner clattner at apple.com
Sat Aug 22 16:45:32 PDT 2009


Hi Dale, sorry for follow up on this so late.

On Aug 13, 2009, at 11:26 AM, Dale Johannesen wrote:
On Aug 12, 2009, at 8:53 PMPDT, Chris Lattner wrote:
>> On Aug 12, 2009, at 5:28 PM, Dale Johannesen wrote:
>>
>>> Author: johannes
>>> Date: Wed Aug 12 19:28:52 2009
>>> New Revision: 78872
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=78872&view=rev
>>> Log:
>>> Symbols with LinkerPrivateLinkage are weak.
>>> This allows WebKit to build again.
>>
>> What specifically does this change?
>
> It changes
>
>       .private_extern l_objc_msgSend_fixup_alloc
>        .section        __DATA,__objc_msgrefs,coalesced
> 	.align  4
> l_objc_msgSend_fixup_alloc:
>        .quad   _objc_msgSend_fixup
>        .quad   L_OBJC_METH_VAR_NAME_16
>
> to
>
>       .private_extern l_objc_msgSend_fixup_alloc
>        .section        __DATA,__objc_msgrefs,coalesced
>        .globl l_objc_msgSend_fixup_alloc
>        .weak_definition l_objc_msgSend_fixup_alloc
> 	.align  4
> l_objc_msgSend_fixup_alloc:
>        .quad   _objc_msgSend_fixup
>        .quad   L_OBJC_METH_VAR_NAME_16
>
> If you want to know what the ObjC metadata is doing, I don't know,  
> but this is what gcc does.
>
>> Can you add a regtest?
>
> I suppose.  There are some in the gcc testsuite.  I was asked not to  
> run it anymore but somebody should be; it's the best tests we have  
> for ObjC metadata.
>
>> Do ppc/arm need a similar fix?
>
> Probably, good catch, I'll look at it.
>

I still don't understand what this is doing.  "l" labels are not  
visible outside of their translation unit.  Why could they possibly  
need to be marked as weak definitions?  They can't be overridden by  
other translation units, so it doesn't make sense (to me) for them to  
have to be weak.

-Chris




More information about the llvm-commits mailing list