[patch] Use "new style" stubs on ppc too

Iain Sandoe via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 03:58:57 PDT 2016


> On 17 May 2016, at 17:18, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> 
> X86 and ARM switched to using the same section for stubs of hidden and
> non hidden symbols.
> 
> This patch does the same for ppc.
> 
> Cheers,
> Rafael
> <t.diff>

Looks like a nice cleanup, it’s just a little hard to be certain of the consequences of the change:

1. The current behaviour does match what the last gcc-4.2 powerpc toolchain produces.
2. Did testing throw anything up? (I somehow doubt it without any runtime-tests)

3. If the symbol is visible, then it’s potentially interposed, so I guess the issue is whether the non_lazy_symbol_pointer section is writeable for that purpose, which means that dyld might be the determining factor.  (That it works with x86 [on darwin9?], suggests this is OK).  Probably, the best thing is to try some checks on older systems (will try to do that in the next few days).

4. Assuming that dyld (on darwin9, at least) will support the change; if linker support is required, I think we will just have to live with that - LLVM is not really usable on darwin9 or earlier without modern tools (I have a combined forward-and-back port + some fixes here: https://github.com/iains/darwin-xtools if anyone wants it).  I’ll be pushing an update to cctools-877.8/ld64-253.9 maybe today or tomorrow.  If we need additional support for older systems, that’s a place to add it.

Iain



More information about the llvm-commits mailing list