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

Wilco Dijkstra Wilco.Dijkstra@arm.com
Mon Aug 29 11:49:51 GMT 2022


Hi,

It's obviously a bug in the way BUILD_PIE_DEFAULT is implemented.
For example one issue is in include/libc-symbols.h:

 #if defined SHARED || defined LIBC_NONSHARED \
  || (BUILD_PIE_DEFAULT && IS_IN (libc))

That should be something like && !IS_IN (nscd) - that builds and removes
a bunch of GOT indirections.

There is a similar issue with special symbol handling, particularly for
__libc_single_threaded.

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?

Cheers,
Wilco


More information about the Libc-alpha mailing list