r199709 - Use private linkage for utf-16 objc strings too.

Bob Wilson bob.wilson at apple.com
Wed Feb 26 08:42:39 PST 2014


Ah, OK. Apple’s current release branch includes r199709 but not r201700. I’ll pull that in. Let me know if you know of any other recent changes that fix recent regressions like this.

On Feb 26, 2014, at 5:35 AM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:

> On 25 February 2014 19:30, Bob Wilson <bob.wilson at apple.com> wrote:
>> Rafael, this change is causing problems. Apple’s linker needs to see labels in the __ustring sections, and with this change, the ustring labels are local to the assembler and never seen at link-time. Please revert this. We can investigate getting the linker to relax that constraint in the future, but it doesn’t work now.
> 
> That is not the case. Since r201700 llvm knows the needs of the
> linker. For example, given
> 
> @private2 = private unnamed_addr constant [5 x i16] [i16 116, i16 101,
>                                                     i16 115, i16 116, i16 0]
> 
> 
> llc will print
> 
> .section __TEXT,__text,regular,pure_instructions
> .section __TEXT,__ustring
> .align 1                       ## @private2
> l_private2:
> .short 116                     ## 0x74
> .short 101                     ## 0x65
> .short 115                     ## 0x73
> .short 116                     ## 0x74
> .short 0                       ## 0x0
> 
> note that a lowercase 'l' is used, so the symbol *is* visible to the linker.
> 
> Cheers,
> Rafael





More information about the cfe-commits mailing list