static pie: confusion between _DYNAMIC, crt1.o, Scrt1.o

Florian Weimer fweimer@redhat.com
Mon Oct 24 10:11:03 GMT 2022


* Samuel Thibault:

> Is it not possible to make -static -pie get the same behavior? That'd be
> way more orthogonal for people to understand.

I think you want -static to mean -static-pie if GCC defaults to PIE,
right?

That will break a few things that use gcc -static to build binaries for
quasi-bare-metal targets using the GNU ELF toolchain (where glibc's
startup code is not use).  Overall it might still be the better
trade-off.

Thanks,
Florian



More information about the Libc-alpha mailing list