Re: static pie: confusion between _DYNAMIC, crt1.o, Scrt1.o
Florian Weimer, le lun. 24 oct. 2022 12:11:03 +0200, a ecrit:
> * 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 would actually provide the pie benefit automatically for all
static executable, yes. Otherwise static pie will be a nice thing, but
not actually largely used in practice. And most people won't actually
realize it.
> 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).
But then the piece which is saying that glibc's startup code is not in
use can be fixed into not using static-pie, can't it?
Samuel
Reply to: