summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/ld/emulparams/shelf64.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/binutils/ld/emulparams/shelf64.sh')
-rw-r--r--gnu/usr.bin/binutils/ld/emulparams/shelf64.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils/ld/emulparams/shelf64.sh b/gnu/usr.bin/binutils/ld/emulparams/shelf64.sh
index 2c9a9c513bd..eb1f6c76ecd 100644
--- a/gnu/usr.bin/binutils/ld/emulparams/shelf64.sh
+++ b/gnu/usr.bin/binutils/ld/emulparams/shelf64.sh
@@ -6,4 +6,13 @@ EXTRA_EM_FILE=
. ${srcdir}/emulparams/shelf32.sh
# We do not need .cranges
-OTHER_SECTIONS=''
+test -z "$CREATE_SHLIB" && OTHER_SECTIONS="
+ .stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x40000)} :
+ {
+ ${RELOCATING+_stack = .;}
+ *(.stack)
+ LONG(0xdeaddead)
+ }
+"
+# We do not need .stack for shared library.
+test -n "$CREATE_SHLIB" && OTHER_SECTIONS=""