# This is for embedded products (no MMU) with ELF. setvar MACHINE = '' setvar SCRIPT_NAME = 'elf' setvar TEMPLATE_NAME = 'elf32' # Symbols have underscore prepended. setvar OUTPUT_FORMAT = ""elf32-us-cris"" setvar NO_REL_RELOCS = 'yes' setvar ARCH = 'cris' setvar MAXPAGESIZE = '32' setvar ENTRY = '__start' setvar EMBEDDED = 'yes' setvar ALIGNMENT = '32' setvar TEXT_START_ADDR = '0' # Put crt0 for flash/eprom etc. in this section. setvar INITIAL_READONLY_SECTIONS = '' if test -z ${CREATE_SHLIB} { setvar INITIAL_READONLY_SECTIONS = "".interp ${RELOCATING-0} : { *(.interp) }"" } setvar INITIAL_READONLY_SECTIONS = ""${INITIAL_READONLY_SECTIONS} .startup : { KEEP(*(.startup)) }"" # Setting __Stext to . in TEXT_START_SYMBOLS doesn't get what we want # most of the time, which is the start of all read-only sections; # there's at least .startup and .init before it. We have to resort to # trickery. Note that __Stext is always defined, not PROVIDE:d, since # external tools look for it. setvar TEXT_START_SYMBOLS = ''__Stext = ADDR (.startup);'' # The __start dance is to get us through assumptions about entry # symbols, and to clear _start for normal use with sane programs. setvar EXECUTABLE_SYMBOLS = '' __start = DEFINED(__start) ? __start : DEFINED(_start) ? _start : DEFINED(start) ? start : DEFINED(.startup) ? .startup + 2 : 2; '' # Smuggle an "OTHER_TEXT_END_SYMBOLS" here. setvar OTHER_READONLY_SECTIONS = "${RELOCATING+PROVIDE (__Etext = .);}" setvar DATA_START_SYMBOLS = ''PROVIDE (__Sdata = .);'' # Smuggle an "OTHER_DATA_END_SYMBOLS" here. setvar OTHER_SDATA_SECTIONS = "${RELOCATING+PROVIDE (__Edata = .);}" # If .bss does not immediately follow .data but has its own start # address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we # use ADDR(.bss) there. Instead, we use the symbol support for the # end symbol. setvar OTHER_BSS_END_SYMBOLS = '' PROVIDE (__Ebss = .); __Sbss = ADDR (.bss); PROVIDE (_bss_start = __Sbss); '' setvar OTHER_END_SYMBOLS = ''PROVIDE (__end = .);'' setvar INIT_ADDR = ''ALIGN (2)'' setvar INIT_START = '' ___init__start = .; PROVIDE (___do_global_ctors = .); '' setvar INIT_END = '' PROVIDE (__init__end = .); PROVIDE (___init__end = .); '' setvar FINI_ADDR = ''ALIGN (2)'' setvar FINI_START = '' ___fini__start = .; PROVIDE (___do_global_dtors = .); '' setvar FINI_END = '' PROVIDE (__fini__end = .); ___fini__end = .; '' setvar CTOR_START = '' PROVIDE (___ctors = .); ___elf_ctors_dtors_begin = .; '' setvar CTOR_END = '' PROVIDE (___ctors_end = .); '' setvar DTOR_START = '' PROVIDE (___dtors = .); '' setvar CTOR_END = '' PROVIDE (___dtors_end = .); ___elf_ctors_dtors_end = .; '' # Also add the other symbols provided for rsim/xsim and elinux. setvar OTHER_SYMBOLS = '' PROVIDE (__Eall = .); PROVIDE (__Endmem = 0x10000000); PROVIDE (__Stacksize = 0); '' setvar NO_SMALL_DATA = 'yes'