[PATCH] 32-bit PowerPC ELF Position Independent Code
Justin Hibbits
chmeeedalf at gmail.com
Wed Jul 16 07:05:48 PDT 2014
On Wed, 16 Jul 2014 07:33:58 -0500
Bill Schmidt <wschmidt at linux.vnet.ibm.com> wrote:
> On Wed, 2014-07-16 at 07:10 -0500, Bill Schmidt wrote:
> > Hi Justin,
> >
> > On Tue, 2014-07-15 at 22:36 -0700, Justin Hibbits wrote:
> >
> > > Thanks for reviewing the code. I think I've addressed all your
> > > comments, including adding a few rudimentary tests for it. I've
> > > attached the most recent patch for review. I hope this can get in
> > > before the 3.5 branch, so will also be looking for somebody with
> > > commit privileges to do the honors.
> >
> > Thanks for the changes. You did address all the changes but one:
> > I'm still unsure why you are using .got2 rather than .got. Can you
> > please explain? In the end it's no skin off my back if you want to
> > keep the redundant PLT stubs, as I don't have any investment in
> > 32-bit efficiency; so this isn't a showstopper for me, but others
> > may care. This may be the right thing for you, but it would be good
> > to understand why.
>
> Justin had actually clarified this in IRC overnight, but I didn't see
> the message until now. He uses .got2 because this is what he sees
> from GCC. Justin, this is a fine reason, but I suggest that you
> follow up with Alan Modra to see whether GCC always uses this or
> whether this behavior depends on any options. This is no reason to
> hold up the patch, though.
".got" is used for small-model PIC (-fpic). I haven't seen any usage
of that for quite some time in software I've compiled, everything tends
to just go with -fPIC. If there's a way we can distinguish those two
methods in llvm, I'll add the small model next, after this is committed.
>
> Thanks,
> Bill
>
> >
> > The tests are a good start. You should also have a test that
> > demonstrates the use of R30 as GOT base when accessing a global,
> > and a test that demonstrates the use of R29 as the base register
> > when needed. There are probably existing tests that you can modify
> > for these purposes, though I can't point to them offhand.
I'll look and add some, thanks.
> >
> > I'm constrained by company policy from committing patches on behalf
> > of others except in urgent circumstances, so I hope one of the other
> > PPC32-interested folks will be willing to step up here once the
> > patch is complete.
> >
> > Thanks,
> > Bill
> >
> > >
> > > Thanks,
> > > Justin
Thanks for the review!
- Justin
More information about the llvm-commits
mailing list