[llvm] r226503 - Add r224985 back with fixes.

Rafael Espíndola rafael.espindola at gmail.com
Thu Feb 12 07:46:18 PST 2015


On 10 February 2015 at 22:23, Steven Wu <stevenwu at apple.com> wrote:
> Hi Rafael
>
> It seems this patch breaks Objc completely (again). You will want to add  __DATA,__objc_classrefs to your list.
> __objc_classrefs section stores pointers to Objc class and it requires a label for every pointer in the section.
> For example, assembly code from objc contains multiple sections of code looks like:
>    .section  __DATA,__objc_classrefs,regular,no_dead_strip
>    .align  3                       ; @"OBJC_CLASSLIST_REFERENCES_$_"
>  L_OBJC_CLASSLIST_REFERENCES_$_:
>    .quad _OBJC_CLASS_$_A
>
> After this patch, all the pointer gets merged under one temp label. Linker might fix up that label and objc class cannot be correctly indexed anymore.
> “L_OBJC_CLASSLIST_REFERENCES_*” doesn’t have to be kept but every pointer in that section needs a ‘l’ or ‘L’ label.
> Let me know if you want a PR for this issue as well.
>

Nick, why are linker visible labels required in this case? Only on
AArch64? The section is marked no_dead_strip, so what is the linker
doing (or failing to do) that breaks?

Steven, can you try the attached patch?

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 2974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150212/4102e29f/attachment.obj>


More information about the llvm-commits mailing list