r203052 - Construct GlobalValues with the correct linkage instead of using setLinkage.

Nick Kledzik kledzik at apple.com
Thu Mar 6 11:03:45 PST 2014


On Mar 6, 2014, at 10:56 AM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:

> On 6 March 2014 13:40, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>> looking.
> 
> The provided testcase is identical before and after the change.  The
> difference on trunk is from r203059.
> 
> Nick, can you please explain what does it mean for a symbol to have a
> linker private prefix 'l' and yet be weak? Is it just a marker saying
> "you can merge this"? Is the merging done by content or symbol name?
weak-def tells the linker the content can be merged/coalesced by name.
The ‘l’ symbol prefix tells the linker the not add the symbol name to the final output.
This combination really only make sense for visibility=hidden symbols (which they were).

-Nick


> 
> At the llvm level, we can merge any internal or private symbol that is
> also unnamed_addr. Should we simply add a WeakDef marker for all such
> symbols?
> 
> Cheers,
> Rafael





More information about the cfe-commits mailing list