ELF: Call check_relocs after opening all inputs
[binutils-gdb.git] / ld / emulparams / shelf.sh
index 95db5877d7f52571fa48e5e4b0cb12f8014f6565..5b3431949021d6d64cf5ac464bb6c0f5b69a492f 100644 (file)
@@ -1,5 +1,9 @@
+# If you change this file, please also look at files which source this one:
+# shlelf.sh, shelf_nbsd.sh
+
 SCRIPT_NAME=elf
 OUTPUT_FORMAT="elf32-sh"
+NO_REL_RELOCS=yes
 TEXT_START_ADDR=0x1000
 MAXPAGESIZE=128
 ARCH=sh
@@ -7,11 +11,13 @@ MACHINE=
 TEMPLATE_NAME=elf32
 GENERATE_SHLIB_SCRIPT=yes
 EMBEDDED=yes
-
 # These are for compatibility with the COFF toolchain.
 ENTRY=start
 CTOR_START='___ctors = .;'
 CTOR_END='___ctors_end = .;'
 DTOR_START='___dtors = .;'
 DTOR_END='___dtors_end = .;'
-OTHER_RELOCATING_SECTIONS='.stack 0x30000 : { _stack = .; *(.stack) }'
+STACK_ADDR="(DEFINED(_stack) ? _stack : 0x3FFFFF00)"
+STACK_SENTINEL="LONG(0xdeaddead)"
+# We do not need .stack for shared library.
+test -n "$CREATE_SHLIB" && unset STACK_ADDR