1SCRIPT_NAME=elf 2OUTPUT_FORMAT="elf32-csky-little" 3BIG_OUTPUT_FORMAT="elf32-csky-big" 4LITTLE_OUTPUT_FORMAT="elf32-csky-little" 5NO_REL_RELOCS=yes 6TARGET_PAGE_SIZE=0x400 7MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" 8TEXT_START_ADDR=0x60000000 9DATA_ADDR=0x20000000 10 11# The default address spaces 12# RAM: 0x0 - 0x1FFFFFFF 13# RAM: 0x20000000 - 0x3FFFFFFF 14# RAM: 0x60000000 - 0x7FFFFFFF 15# 16# There are some symbols used in the crt.S 17# __stack: The stack top 18# __heap_start: The heap start 19# __heap_end: The heap end 20# __csky_exit: Be used by qemu to check exit 21 22OTHER_SYMBOLS=' 23 PROVIDE (__stack = 0x01000000 - 0x8); 24 PROVIDE (__heap_start = 0x00000100); 25 PROVIDE (__heap_end = 0x00900000); 26 PROVIDE (__csky_exit = 0x10002000); 27' 28CHECK_RELOCS_AFTER_OPEN_INPUT=yes 29NONPAGED_TEXT_START_ADDR=0 30ATTRS_SECTIONS='.csky.attributes 0 : { KEEP (*(.csky.attributes)) KEEP (*(.csky.attributes)) }' 31ARCH=csky 32EMBEDDED=yes 33EXTRA_EM_FILE=cskyelf 34 35# There is a problem with the NOP value - it must work for both 36# big endian and little endian systems. Unfortunately there is 37# no symmetrical mcore opcode that functions as a noop. The 38# chosen solution is to use "tst r0, r14". This is a symmetrical 39# value, and apart from the corruption of the C bit, it has no other 40# side effects. Since the carry bit is never tested without being 41# explicitly set first, and since the NOP code is only used as a 42# fill value between independently viable pieces of code, it should 43# not matter. 44NOP=0 45 46ENTRY=__start 47OTHER_BSS_SYMBOLS="__sbss__ = . ;" 48OTHER_BSS_END_SYMBOLS="__ebss__ = . ;" 49 50# This sets the stack to the top of the simulator memory (2^19 bytes). 51# STACK_ADDR=0x80000 52 53TEMPLATE_NAME=elf 54