1# $MirOS: src/gnu/usr.bin/binutils/ld/emulparams/shelf.sh,v 1.2 2005/03/13 16:07:05 tg Exp $ 2# 3# If you change this file, please also look at files which source this one: 4# shlelf.sh, shelf_nbsd.sh 5 6SCRIPT_NAME=elf 7OUTPUT_FORMAT="elf32-sh" 8TEXT_START_ADDR=0x1000 9MAXPAGESIZE=128 10ARCH=sh 11MACHINE= 12TEMPLATE_NAME=elf32 13GENERATE_SHLIB_SCRIPT=yes 14EMBEDDED=yes 15 16# These are for compatibility with the COFF toolchain. 17ENTRY=start 18CTOR_START='___ctors = .;' 19CTOR_END='___ctors_end = .;' 20DTOR_START='___dtors = .;' 21DTOR_END='___dtors_end = .;' 22# This is like setting STACK_ADDR to 0x300000, except that the setting can 23# be overridden, e.g. --defsym _stack=0x0f00, and that we put an extra 24# sentinal value at the bottom. 25# N.B. We can't use PROVIDE to set the default value in a symbol because 26# the address is needed to place the .stack section, which in turn is needed 27# to hold the sentinel value(s). 28test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" .stack ${RELOCATING-0}${RELOCATING+\(DEFINED\(_stack\) ? _stack : 0x300000\)} : 29 { 30 ${RELOCATING+_stack = .;} 31 *(.stack) 32 LONG(0xdeaddead) 33 }" 34# We do not need .stack for shared library. 35test -n "$CREATE_SHLIB" && OTHER_SECTIONS="" 36