]> git.ipfire.org Git - people/ms/gcc.git/commit
LoongArch: Prepare static PIE support
authorXi Ruoyao <xry111@xry111.site>
Tue, 13 Sep 2022 15:21:39 +0000 (23:21 +0800)
committerXi Ruoyao <xry111@xry111.site>
Tue, 20 Sep 2022 05:59:30 +0000 (13:59 +0800)
commit90d3e27f3a6add0cd6892bdf07c6a2538bb709e4
tree1c2fa4462b693fec03020dda233b4ab11186e1a1
parent2b61ed838c7f3f4bf54d4530c0f053b420623beb
LoongArch: Prepare static PIE support

Static PIE allows us to extend the ASLR to cover static executables and
it's not too difficult to support it.  On GCC side, we just pass a group
of options to the linker, like other ports with static PIE support.

The real implementation of static PIE (rcrt1.o) will be added into Glibc
later.

gcc/ChangeLog:

* config/loongarch/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): For
-static-pie, pass -static -pie --no-dynamic-linker -z text to
the linker, and do not pass --dynamic-linker.
gcc/config/loongarch/gnu-user.h