[RESEND PATCH] Makeconfig: Set pie-ccflag to -fPIE by default

H.J. Lu hjl.tools@gmail.com
Fri Aug 26 19:02:55 GMT 2022


On Fri, Aug 26, 2022 at 11:39 AM Wilco Dijkstra via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> Hi,
>
> >> I recall that powerpc wanted to use -mcmodel=large, but it would require to
> >> adjust a lot of assembly implementations.  Are we sure this change does not
> >> trigger any regression with current glibc code?
>
> I don't see significant differences in terms of codesize on AArch64, so the patch
> is fine. As Richard mentioned, it often doesn't make any difference if a function
> only uses a single global.
>
> However this exposes a bug: it appears all symbols, including hidden symbols,
> are always accessed via the GOT in libc.a even when they don't in libc.so. As a
> result PIE code quality is actually worse than PIC... This affects libc_single_threaded

Is this issue processor specific?

> and many uses of internal arrays etc.
>
> So it looks like we should not ignore hidden when building for PIE.



-- 
H.J.


More information about the Libc-alpha mailing list