diff options
author | 2014-12-22 19:32:49 +0000 | |
---|---|---|
committer | 2014-12-22 19:32:49 +0000 | |
commit | e14b3562fdfb33fbc1dbd1d8f772b41e7bce40f4 (patch) | |
tree | 3ae4d28da854d5e1a3d06508cfb30d5acec0069b | |
parent | sync (diff) | |
download | wireguard-openbsd-e14b3562fdfb33fbc1dbd1d8f772b41e7bce40f4.tar.xz wireguard-openbsd-e14b3562fdfb33fbc1dbd1d8f772b41e7bce40f4.zip |
Link -static -pie executables with rcrt0.o instead of crt0.o such that they
self-relocate.
Based on a diff from kurt@
ok deraadt@
-rw-r--r-- | gnu/gcc/gcc/config/i386/openbsd64.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/gcc/gcc/config/i386/openbsd64.h b/gnu/gcc/gcc/config/i386/openbsd64.h index 87d2f980c2c..7984fe61a8f 100644 --- a/gnu/gcc/gcc/config/i386/openbsd64.h +++ b/gnu/gcc/gcc/config/i386/openbsd64.h @@ -44,7 +44,8 @@ Boston, MA 02111-1307, USA. */ /* As an elf system, we need crtbegin/crtend stuff. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ - %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \ + %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} \ + %{!p:%{!static:crt0%O%s} %{static:%{pie:rcrt0%O%s} %{!pie:crt0%O%s}}}} \ crtbegin%O%s} %{shared:crtbeginS%O%s}" #undef ENDFILE_SPEC #define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}" |