On Sep 12, 2014, at 1:28 PM, Rafael Espíndola <[email protected]> 
wrote:

>> I think you are confused by all the meanings of “weak”.   You are thinking 
>> of a weak_import which can be missing at runtime.
> 
> Well, I was unsure which one was desired in this case.
> 
>> ObjC only uses weak-definitions which are definitions that are automatically 
>> coalesced.
>> 
>> ld64 does support weak-def ‘l’ symbols.  Their atoms are coalesced by name, 
>> then the name is removed in the final output.  ObjC uses this for some data 
>> structures where the ‘l’ name has the user class/protocol name embedded in 
>> it.  It is used to reduce duplication of data structures.
> 
> Cool, fixed in r217704.
> 
> BTW, is there a difference between an 'l' symbol and one with hidden
> visibility (.private_extern)?

Usually ‘l’ symbols are static (file scoped). They are just there to break up a 
section into atoms.  

Sometimes they are private_extern if you want to coalesce them during the link, 
as you saw with the objc (weak_def) symbols.

-Nick


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to