2 OUTPUT_FORMAT("a.out-cris")
7 .text ${RELOCATING+ ${TEXT_START_ADDR}}:
10 ${RELOCATING+ __Stext = .;}
11 ${RELOCATING+*(.startup)}
13 ${RELOCATING+*(.text.*)}
14 ${RELOCATING+*(.gnu.linkonce.t*)}
15 ${RELOCATING+*(.rodata)}
16 ${RELOCATING+*(.rodata.*)}
17 ${RELOCATING+*(.gnu.linkonce.r*)}
19 /* Do not "provide" init-start and fini-start symbols; they might be
20 referred to weakly, so the linker would not override the zero
22 FIXME: It's somewhat unexpected to have code emitted by the linker
23 script. Some other mechanism could probably do better. */
24 ${RELOCATING+. = ALIGN (2);}
25 ${RELOCATING+ ___init__start = .;}
26 ${RELOCATING+PROVIDE (___do_global_ctors = .);}
27 ${RELOCATING+SHORT (0xe1fc); /* push srp */}
28 ${RELOCATING+SHORT (0xbe7e);}
29 ${RELOCATING+*(.init)}
30 ${RELOCATING+SHORT (0x0d3e); /* jump [sp+] */}
31 ${RELOCATING+PROVIDE (__init__end = .);}
32 ${RELOCATING+PROVIDE (___init__end = .);}
34 ${RELOCATING+. = ALIGN (2);}
35 ${RELOCATING+ ___fini__start = .;}
36 ${RELOCATING+PROVIDE (___do_global_dtors = .);}
37 ${RELOCATING+SHORT (0xe1fc); /* push srp */}
38 ${RELOCATING+SHORT (0xbe7e);}
39 ${RELOCATING+*(.fini)}
40 ${RELOCATING+SHORT (0x0d3e); /* jump [sp+] */}
41 ${RELOCATING+PROVIDE (__fini__end = .);}
42 ${RELOCATING+ ___fini__end = .;}
44 /* Putting constructors in constant store is sane as long as
45 there's no need for dynamic fixups. */
46 /* The constructors and destructors set symbols are unused now that
47 collect2 has its wicked way. */
48 ${CONSTRUCTING+ ___aout_ctors_dtors_begin = .;}
49 ${CONSTRUCTING+ SORT(CONSTRUCTORS);}
50 ${CONSTRUCTING+ ___aout_ctors_dtors_end = .;}
52 /* Cater to linking from ELF. */
53 ${CONSTRUCTING+ PROVIDE(___ctors = .);}
54 ${CONSTRUCTING+ ___elf_ctors_dtors_begin = .;}
55 ${CONSTRUCTING+ KEEP (*crtbegin.o(.ctors))}
56 ${CONSTRUCTING+ KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))}
57 ${CONSTRUCTING+ KEEP (*(SORT(.ctors.*)))}
58 ${CONSTRUCTING+ KEEP (*(.ctors))}
59 ${CONSTRUCTING+ PROVIDE(___ctors_end = .);}
61 ${CONSTRUCTING+ PROVIDE(___dtors = .);}
62 ${CONSTRUCTING+ KEEP (*crtbegin.o(.dtors))}
63 ${CONSTRUCTING+ KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))}
64 ${CONSTRUCTING+ KEEP (*(SORT(.dtors.*)))}
65 ${CONSTRUCTING+ KEEP (*(.dtors))}
66 ${CONSTRUCTING+ PROVIDE(___dtors_end = .);}
67 ${CONSTRUCTING+ ___elf_ctors_dtors_end = .;}
69 ${RELOCATING+ __Etext = .;}
71 /* Deprecated, use __Etext. */
72 ${RELOCATING+ PROVIDE(_etext = .);}
75 /* Any dot-relative start-expression (such as "ALIGN(2)", also including
76 the "default" .data alignment expression) will use the initial, raw
77 size of .text and will be incorrect if the alignment used is less
78 than the alignment for .text (which might depend on input and obj
79 format). FIXME: Seems like a bug in ld. Seems hard to fix. Seems
83 ${RELOCATING+ __Sdata = .;}
85 ${RELOCATING+*(.data.*)}
86 ${RELOCATING+*(.gnu.linkonce.d*)}
87 ${RELOCATING+*(.eh_frame) /* FIXME: Make .text */}
88 ${RELOCATING+*(.gcc_except_table)}
89 ${RELOCATING+ __Edata = .;}
91 /* Deprecated, use __Edata. */
92 ${RELOCATING+ PROVIDE(_edata = .);}
97 /* Deprecated, use __Sbss. */
98 ${RELOCATING+ PROVIDE(_bss_start = .);}
100 ${RELOCATING+ __Sbss = .;}
102 ${RELOCATING+*(.bss.*)}
104 ${RELOCATING+ __Ebss = .;}
106 /* Deprecated, use __Ebss or __Eall as appropriate. */
107 ${RELOCATING+ PROVIDE(_end = .);}
108 ${RELOCATING+ PROVIDE(__end = .);}
110 ${RELOCATING+ __Eall = .;}
112 /* Unfortunately, stabs are not mappable from ELF to a.out.
113 It can probably be fixed with some amount of work. */
114 /DISCARD/ : { *(.stab) *(.stab*) *(.debug) *(.debug*) *(.comment) }
116 /* For the rsim and xsim simulators. */
117 ${RELOCATING+ PROVIDE(__Endmem = 0x10000000);}
120 ${RELOCATING+ PROVIDE(__Stacksize = 0);}