diff options
author | Kurt Miller <kurt@cvs.openbsd.org> | 2014-12-22 21:59:19 +0000 |
---|---|---|
committer | Kurt Miller <kurt@cvs.openbsd.org> | 2014-12-22 21:59:19 +0000 |
commit | edc52f510dbd208d47bfce3220f798059aadf8a3 (patch) | |
tree | 9ef1d7ecff260be3ccbbbe1d9dae8a47c2f6134f /gnu/gcc | |
parent | a7011e75e0665f391f1e7671cff112ad01656ab4 (diff) |
Link -static -pie executables with rcrt0.o instead of crt0.o such that they
self-relocate.
Diffstat (limited to 'gnu/gcc')
-rw-r--r-- | gnu/gcc/gcc/config/i386/openbsdelf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/gcc/gcc/config/i386/openbsdelf.h b/gnu/gcc/gcc/config/i386/openbsdelf.h index e6a3d9928e1..b0e86a62394 100644 --- a/gnu/gcc/gcc/config/i386/openbsdelf.h +++ b/gnu/gcc/gcc/config/i386/openbsdelf.h @@ -47,7 +47,8 @@ Boston, MA 02110-1301, 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}" |