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

Wilco Dijkstra Wilco.Dijkstra@arm.com
Mon Aug 29 15:27:36 GMT 2022


Hi Florian,

* Wilco Dijkstra via Libc-alpha:
>> However this leads to the question is why aren't all symbols marked as
>> hidden in the static PIE build? Ie. are there any symbols that must be
>> shared with a DSO loaded by a dl_open?
>
> The static main executable does not have a dynamic symbol table, so such
> sharing cannot happen (except through function pointers being passed
> around, but symbol visibility of course does not matter there).

Right, so it should be safe then to mark all symbols as hidden.

We could also teach GCC to never emit GOT indirections with -fPIE -static
(the only reason to use a GOT indirection is to avoid copy relocations in
dynamically linked binaries).

Cheers,
Wilco


More information about the Libc-alpha mailing list