1 # This is for embedded products (no MMU) with ELF.
6 # Symbols have underscore prepended.
7 OUTPUT_FORMAT
="elf32-us-cris"
15 # Put crt0 for flash/eprom etc. in this section.
16 INITIAL_READONLY_SECTIONS
='.startup : { KEEP(*(.startup)) }'
18 # TEXT_START_SYMBOLS doesn't get what we want which is the start of
19 # all read-only sections; there's at least .init and .fini before it.
20 # We have to resort to trickery.
22 # The __start dance is to get us through assumptions about entry
23 # symbols, and to clear _start for normal use with sane programs.
25 PROVIDE (__Stext = .);
26 __start = DEFINED(__start) ? __start :
27 DEFINED(_start) ? _start :
28 DEFINED(start) ? start :
29 DEFINED(.startup) ? .startup + 2 : 2;
32 # Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
33 OTHER_READONLY_SECTIONS
='PROVIDE (__Etext = .);'
34 DATA_START_SYMBOLS
='PROVIDE (__Sdata = .);'
36 # Smuggle an "OTHER_DATA_END_SYMBOLS" here.
37 OTHER_GOT_SECTIONS
='PROVIDE (__Edata = .);'
39 # If .bss does not immediately follow .data but has its own start
40 # address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we
41 # use ADDR(.bss) there. Instead, we use the symbol support for the
43 OTHER_BSS_END_SYMBOLS
='
46 __Sbss = SIZEOF (.sbss) != 0 ? ADDR (.sbss) : ADDR (.bss);
47 PROVIDE (_bss_start = __Sbss);
53 PROVIDE (___do_global_ctors = .);
54 SHORT (0xe1fc); /* push srp */
59 SHORT (0x0d3e); /* jump [sp+] */
60 PROVIDE (__init__end = .);
61 PROVIDE (___init__end = .);
67 PROVIDE (___do_global_dtors = .);
68 SHORT (0xe1fc); /* push srp */
73 SHORT (0x0d3e); /* jump [sp+] */
74 PROVIDE (__fini__end = .);
79 PROVIDE (___ctors = .);
80 ___elf_ctors_dtors_begin = .;
84 PROVIDE (___ctors_end = .);
88 PROVIDE (___dtors = .);
92 PROVIDE (___dtors_end = .);
93 ___elf_ctors_dtors_end = .;
97 # Smuggle an "OTHER_ALL_END_SYMBOLS" here.
98 # Also add the other symbols provided for rsim/xsim and elinux.
99 OTHER_RELOCATING_SECTIONS
='
100 PROVIDE (__Eall = .);
101 PROVIDE (__Endmem = 0x10000000);
102 PROVIDE (__Stacksize = 0);