[PATCH 5/5] Enable static-pie on powerpc64
Alan Modra
amodra@gmail.com
Fri Jan 28 08:45:46 GMT 2022
On Thu, Jan 27, 2022 at 07:39:44PM +0100, Florian Weimer wrote:
> * Alan Modra via Libc-alpha:
>
> > diff --git a/sysdeps/powerpc/powerpc64/configure.ac b/sysdeps/powerpc/powerpc64/configure.ac
> > index 1f3d54414c..5eedd2f81c 100644
> > --- a/sysdeps/powerpc/powerpc64/configure.ac
> > +++ b/sysdeps/powerpc/powerpc64/configure.ac
> > @@ -1,6 +1,13 @@
> > GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
> > # Local configure fragment for sysdeps/powerpc/powerpc64.
> >
> > +dnl It is always possible to access static and hidden symbols in an
> > +dnl position independent way.
> > +AC_DEFINE(PI_STATIC_AND_HIDDEN)
>
> I must say that this is the most surprising glibc patch I've seen in a
> while.
>
> But I think it's true—once you've set up the TOC pointer, the link
> editor can generate a fixed offset offset for local and hidden symbols.
> Has this always been the case for powerpc64le?
2010-06-25 binutils git commit ba761f19f5. I'm not at all sure the
optimisation was perfect in binutils-2.21, but yes, medium and large
code model toc-indirect code has been converted to toc-relative for a
long time.
--
Alan Modra
Australia Development Lab, IBM
More information about the Libc-alpha
mailing list