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 # Setting __Stext to . in TEXT_START_SYMBOLS doesn't get what we want
19 # most of the time, which is the start of all read-only sections;
20 # there's at least .startup and .init before it. We have to resort to
21 # trickery. Note that __Stext is always defined, not PROVIDE:d, since
22 # external tools look for it.
23 TEXT_START_SYMBOLS
='__Stext = ADDR (.startup);'
25 # The __start dance is to get us through assumptions about entry
26 # symbols, and to clear _start for normal use with sane programs.
28 __start = DEFINED(__start) ? __start :
29 DEFINED(_start) ? _start :
30 DEFINED(start) ? start :
31 DEFINED(.startup) ? .startup + 2 : 2;
34 # Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
35 OTHER_READONLY_SECTIONS
="${RELOCATING+PROVIDE (__Etext = .);}"
36 DATA_START_SYMBOLS
='PROVIDE (__Sdata = .);'
38 # Smuggle an "OTHER_DATA_END_SYMBOLS" here.
39 OTHER_SDATA_SECTIONS
="${RELOCATING+PROVIDE (__Edata = .);}"
41 # If .bss does not immediately follow .data but has its own start
42 # address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we
43 # use ADDR(.bss) there. Instead, we use the symbol support for the
45 OTHER_BSS_END_SYMBOLS
='
48 PROVIDE (_bss_start = __Sbss);
50 OTHER_END_SYMBOLS
='PROVIDE (__end = .);'
55 PROVIDE (___do_global_ctors = .);
59 PROVIDE (__init__end = .);
60 PROVIDE (___init__end = .);
66 PROVIDE (___do_global_dtors = .);
70 PROVIDE (__fini__end = .);
75 PROVIDE (___ctors = .);
76 ___elf_ctors_dtors_begin = .;
80 PROVIDE (___ctors_end = .);
84 PROVIDE (___dtors = .);
88 PROVIDE (___dtors_end = .);
89 ___elf_ctors_dtors_end = .;
92 # Also add the other symbols provided for rsim/xsim and elinux.
95 PROVIDE (__Endmem = 0x10000000);
96 PROVIDE (__Stacksize = 0);