1# Note: this parameter script is sourced by the other 2# sh[l]elf(32|64).sh parameter scripts. 3SCRIPT_NAME=elf 4OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf32-sh64"} 5NO_REL_RELOCS=yes 6TEXT_START_ADDR=0x1000 7MAXPAGESIZE=128 8ARCH=sh 9MACHINE=sh5 10ALIGNMENT=8 11TEMPLATE_NAME=elf32 12GENERATE_SHLIB_SCRIPT=yes 13EMBEDDED=yes 14 15DATA_START_SYMBOLS='PROVIDE (___data = .);' 16 17# If data is located right after .text (not explicitly specified), 18# then we need to align it to an 8-byte boundary. 19OTHER_READONLY_SECTIONS=' 20PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0); 21. = ALIGN (8); 22' 23 24# Make _edata and .bss aligned by smuggling in an alignment directive. 25OTHER_GOT_SECTIONS='. = ALIGN (8);' 26 27# These are for compatibility with the COFF toolchain. 28ENTRY=start 29CTOR_START='___ctors = .;' 30CTOR_END='___ctors_end = .;' 31DTOR_START='___dtors = .;' 32DTOR_END='___dtors_end = .;' 33 34# Do not use the varname=${varname-'string'} construct here; there are 35# problems with that on some shells (e.g. on Solaris) where there is a bug 36# that trigs when $varname contains a "}". 37# The effect of the .stack definition is like setting STACK_ADDR to 0x80000, 38# except that the setting can be overridden, e.g. --defsym _stack=0xff000, 39# and that we put an extra sentinal value at the bottom. 40# N.B. We can't use PROVIDE to set the default value in a symbol because 41# the address is needed to place the .stack section, which in turn is needed 42# to hold the sentinel value(s). 43test -z "$CREATE_SHLIB" && OTHER_SECTIONS=" 44 .stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x80000)} : 45 { 46 ${RELOCATING+_stack = .;} 47 *(.stack) 48 LONG(0xdeaddead) 49 } 50 .cranges 0 : { *(.cranges) } 51" 52# We do not need .stack for shared library. 53test -n "$CREATE_SHLIB" && OTHER_SECTIONS=" 54 .cranges 0 : { *(.cranges) } 55" 56 57# We need to adjust sizes in the .cranges section after relaxation, so 58# we need an after_allocation function, and it goes in this file. 59EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf} 60