summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils-2.17
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2018-12-18 21:14:23 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2018-12-18 21:14:23 +0000
commit4ce0afb7dc89ed5216f0ac3d918b428f746ed0ac (patch)
tree05997024df90acceee0f2291e5d77baea031a3f6 /gnu/usr.bin/binutils-2.17
parentea064182db9bc9501b5443eaf97a72b0323d8cf9 (diff)
Generate PIE ldscripts on armv7, hppa, and sh, so that there are symbols
for the start+end of .{preinit,init,fini}_array sections when building PIE executables. ok kettenis@
Diffstat (limited to 'gnu/usr.bin/binutils-2.17')
-rw-r--r--gnu/usr.bin/binutils-2.17/ld/emulparams/armelf_obsd.sh1
-rw-r--r--gnu/usr.bin/binutils-2.17/ld/emulparams/hppaobsd.sh1
-rw-r--r--gnu/usr.bin/binutils-2.17/ld/emulparams/shelf_obsd.sh1
3 files changed, 3 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils-2.17/ld/emulparams/armelf_obsd.sh b/gnu/usr.bin/binutils-2.17/ld/emulparams/armelf_obsd.sh
index dfcd1b83b43..cac67d353fd 100644
--- a/gnu/usr.bin/binutils-2.17/ld/emulparams/armelf_obsd.sh
+++ b/gnu/usr.bin/binutils-2.17/ld/emulparams/armelf_obsd.sh
@@ -4,6 +4,7 @@ MAXPAGESIZE=0x8000
COMMONPAGESIZE=0x1000
TEXT_START_ADDR=0x00008000
TARGET2_TYPE=got-rel
+GENERATE_PIE_SCRIPT=yes
NOP=0x00000000
TRAP=0xffffffff
diff --git a/gnu/usr.bin/binutils-2.17/ld/emulparams/hppaobsd.sh b/gnu/usr.bin/binutils-2.17/ld/emulparams/hppaobsd.sh
index cc60f10c6d8..1c5a6fdadfe 100644
--- a/gnu/usr.bin/binutils-2.17/ld/emulparams/hppaobsd.sh
+++ b/gnu/usr.bin/binutils-2.17/ld/emulparams/hppaobsd.sh
@@ -14,6 +14,7 @@ OTHER_READONLY_SECTIONS=".PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
DATA_NONEXEC_PLT=
PLT_BEFORE_GOT=
GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
TRAP=0x00000000
. ${srcdir}/emulparams/elf_obsd.sh
diff --git a/gnu/usr.bin/binutils-2.17/ld/emulparams/shelf_obsd.sh b/gnu/usr.bin/binutils-2.17/ld/emulparams/shelf_obsd.sh
index bcf00542d94..96b63358fe3 100644
--- a/gnu/usr.bin/binutils-2.17/ld/emulparams/shelf_obsd.sh
+++ b/gnu/usr.bin/binutils-2.17/ld/emulparams/shelf_obsd.sh
@@ -7,6 +7,7 @@ OUTPUT_FORMAT="elf32-sh-obsd"
TEXT_START_ADDR=0x400000
MAXPAGESIZE=0x10000
COMMONPAGESIZE=0x1000
+GENERATE_PIE_SCRIPT=yes
TRAP=0xc3c3c3c3
DATA_START_SYMBOLS='__data_start = . ;';