diff options
author | 2014-12-22 19:04:24 +0000 | |
---|---|---|
committer | 2014-12-22 19:04:24 +0000 | |
commit | fd6d7054d4375e15bf03539a4178def290892f30 (patch) | |
tree | a410c083806de474646b635a1a62ad7344968859 | |
parent | Self-relocation code for hppa. (diff) | |
download | wireguard-openbsd-fd6d7054d4375e15bf03539a4178def290892f30.tar.xz wireguard-openbsd-fd6d7054d4375e15bf03539a4178def290892f30.zip |
Link -static -pie executables with rcrt0.o instead of crt0.o such that they
self-relocate.
Based on a diff for amd64 from kurt@
-rw-r--r-- | gnu/gcc/gcc/config/pa/openbsd.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/gcc/gcc/config/pa/openbsd.h b/gnu/gcc/gcc/config/pa/openbsd.h index 834464ed8ae..9bb1e573239 100644 --- a/gnu/gcc/gcc/config/pa/openbsd.h +++ b/gnu/gcc/gcc/config/pa/openbsd.h @@ -186,6 +186,9 @@ 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}} crtbegin%O%s} %{shared:crtbeginS%O%s}" +#define STARTFILE_SPEC "\ + %{!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}" |