-static-pie support in 8.1
Dmitry Vyukov via gcc-help
gcc-help@gcc.gnu.org
Sun May 13 15:38:00 GMT 2018
Hello,
I want to build statically-lined pie binaries, a-la -static + -pie, no
dependency on dynamic libraries + loading at random addresses. I see
that this does not work per se as -static overrides -pie. I see that
gcc 8.1 has -static-pie which looks like what I want. But it fails for
me with:
$ gcc-8.1.0/bin/gcc test.c -fPIE -static-pie
/usr/bin/ld: cannot find rcrt1.o: No such file or directory
collect2: error: ld returned 1 exit status
Is there some magic configure flag? Or anything else I am missing?
There are no files rcrt1.o in gcc-8.1.0 installation. For configure I used:
configure --enable-languages=c --disable-bootstrap --disable-checking
--disable-multilib --disable-libquadmath --disable-libada
--disable-libssp --disable-libstdcxx --disable-liboffloadmic
Thanks
More information about the Gcc-help
mailing list