2 OUTPUT_FORMAT
="elf32-csky-little"
3 BIG_OUTPUT_FORMAT
="elf32-csky-big"
4 LITTLE_OUTPUT_FORMAT
="elf32-csky-little"
7 MAXPAGESIZE
="CONSTANT (MAXPAGESIZE)"
8 TEXT_START_ADDR
=0x60000000
11 # The default address spaces
12 # RAM: 0x0 - 0x1FFFFFFF
13 # RAM: 0x20000000 - 0x3FFFFFFF
14 # RAM: 0x60000000 - 0x7FFFFFFF
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
23 PROVIDE (__stack = 0x01000000 - 0x8);
24 PROVIDE (__heap_start = 0x00000100);
25 PROVIDE (__heap_end = 0x00900000);
26 PROVIDE (__csky_exit = 0x10002000);
28 CHECK_RELOCS_AFTER_OPEN_INPUT
=yes
29 NONPAGED_TEXT_START_ADDR
=0
30 ATTRS_SECTIONS
='.csky.attributes 0 : { KEEP (*(.csky.attributes)) KEEP (*(.csky.attributes)) }'
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
47 OTHER_BSS_SYMBOLS
="__sbss__ = . ;"
48 OTHER_BSS_END_SYMBOLS
="__ebss__ = . ;"
50 # This sets the stack to the top of the simulator memory (2^19 bytes).