1 OUTPUT_FORMAT("elf32-mt", "elf32-mt", "elf32-mt")
5 /* Do we need any of these for elf?
9 ram (rwx) : ORIGIN = 0x0, LENGTH = 608K
10 frame-buffer (w) : ORIGIN = 0xff000000, LENGTH = 80K
11 dma-ram (w) : ORIGIN = 0x1000000, LENGTH = 16M-4K
12 ports (w) : ORIGIN = 0xfffff000, LENGTH = 4K
16 /* Read-only sections, merged into text segment: */
18 PROVIDE(__executable_start = 0x0);
19 .interp : { *(.interp) }
21 .dynsym : { *(.dynsym) }
22 .dynstr : { *(.dynstr) }
23 .gnu.version : { *(.gnu.version) }
24 .gnu.version_d : { *(.gnu.version_d) }
25 .gnu.version_r : { *(.gnu.version_r) }
26 .rel.init : { *(.rel.init) }
27 .rela.init : { *(.rela.init) }
28 .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
29 .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
30 .rel.fini : { *(.rel.fini) }
31 .rela.fini : { *(.rela.fini) }
32 .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
33 .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
34 .rel.data.rel.ro : { *(.rel.data.rel.ro*) }
35 .rela.data.rel.ro : { *(.rela.data.rel.ro*) }
36 .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
37 .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
38 .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
39 .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
40 .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
41 .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
42 .rel.ctors : { *(.rel.ctors) }
43 .rela.ctors : { *(.rela.ctors) }
44 .rel.dtors : { *(.rel.dtors) }
45 .rela.dtors : { *(.rela.dtors) }
46 .rel.got : { *(.rel.got) }
47 .rela.got : { *(.rela.got) }
48 .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
49 .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
50 .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
51 .rela.sbss : { *(.rela.sbss .rela.sbss.* .rel.gnu.linkonce.sb.*) }
52 .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
53 .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
54 .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
55 .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
56 .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
57 .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
58 .rel.plt : { *(.rel.plt) }
59 .rela.plt : { *(.rela.plt) }
61 .startup : { *startup-16-003.o(.startup) } >ram =0
64 .init : { KEEP (*(.init)) } >ram =0
65 .plt : { *(.plt) } >ram
68 *startup-16-003.o(.text);
69 *(.text .stub .text.* .gnu.linkonce.t.*)
70 KEEP (*(.text.*personality*))
71 /* .gnu.warning sections are handled specially by elf32.em. */
74 .fini : { KEEP (*(.fini)) } >ram =0
75 PROVIDE (__etext = .);
78 .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } >ram
79 .rodata1 : { *(.rodata1) } >ram
80 .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } >ram
81 .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } >ram
82 .eh_frame_hdr : { *(.eh_frame_hdr) } >ram
83 .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } >ram
84 .gcc_except_table : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >ram
85 /* Adjust the address for the data segment. We want to adjust up to
86 the same address within the page on the next page up. */
87 . = ALIGN(256) + (. & (256 - 1));
88 /* Exception handling */
89 .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } >ram
90 .gcc_except_table : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } >ram
91 /* Thread Local Storage sections */
92 .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } >ram
93 .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } >ram
94 /* Ensure the __preinit_array_start label is properly aligned. We
95 could instead move the label definition inside the section, but
96 the linker would then create the section even if it turns out to
97 be empty, which isn't pretty. */
99 PROVIDE (__preinit_array_start = .);
100 .preinit_array : { *(.preinit_array) } >ram
101 PROVIDE (__preinit_array_end = .);
102 PROVIDE (__init_array_start = .);
103 .init_array : { *(.init_array) } >ram
104 PROVIDE (__init_array_end = .);
105 PROVIDE (__fini_array_start = .);
106 .fini_array : { *(.fini_array) } >ram
107 PROVIDE (__fini_array_end = .);
110 /* gcc uses crtbegin.o to find the start of
111 the constructors, so we make sure it is
112 first. Because this is a wildcard, it
113 doesn't matter if the user does not
114 actually link against crtbegin.o; the
115 linker won't look for a file to match a
116 wildcard. The wildcard also means that it
117 doesn't matter which directory crtbegin.o
119 KEEP (*crtbegin.o(.ctors))
120 /* We don't want to include the .ctor section from
121 from the crtend.o file until after the sorted ctors.
122 The .ctor section from the crtend file contains the
123 end of ctors marker and it must be last */
124 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
125 KEEP (*(SORT(.ctors.*)))
130 KEEP (*crtbegin*.o(.dtors))
131 KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
132 KEEP (*(SORT(.dtors.*)))
135 .jcr : { KEEP (*(.jcr)) } >ram
136 .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) } >ram
137 .dynamic : { *(.dynamic) } >ram
139 /* DJK - Re-align the data section from the read-only section. */
140 . = ALIGN(16) + (. & (16 - 1));
144 *(.data .data.* .gnu.linkonce.d.*)
145 KEEP (*(.gnu.linkonce.d.*personality*))
148 .data1 : { *(.data1) } >ram
149 .got : { *(.got.plt) *(.got) } >ram
151 /* We want the small data sections together, so single-instruction offsets
152 can access them all, and initialized data all before uninitialized, so
153 we can shorten the on-disk segment size. */
154 .sdata : { *(.sdata .sdata.* .gnu.linkonce.s.*) } >ram
156 PROVIDE ( edata = . );
159 PROVIDE (__sbss_start = .);
160 PROVIDE (___sbss_start = .);
162 *(.sbss .sbss.* .gnu.linkonce.sb.*)
164 PROVIDE (__sbss_end = .);
165 PROVIDE (___sbss_end = .);
170 *(.bss .bss.* .gnu.linkonce.b.*)
172 /* Align here to ensure that the .bss section occupies space up to
173 _end. Align after .bss to ensure correct alignment even if the
174 .bss section disappears because there are no input sections. */
178 __bss_start = ADDR ( .sbss ) ;
179 __bss_end = __bss_start + SIZEOF ( .sbss ) + SIZEOF ( .bss ) - 4 ;
183 /* DJK - Initialized frame buffer data is copied from RAM to FB. */
184 .auxbss : AT (ADDR(.bss) + SIZEOF(.bss)) { *(.auxbss) } >frame-buffer
185 .auxdata : AT (LOADADDR(.auxbss) + SIZEOF(.auxbss))
199 _fbbss_start = ADDR ( .auxbss );
200 _fbbss_end = _fbbss_start + SIZEOF ( .auxbss ) - 4;
201 _fbdata_start = LOADADDR ( .auxdata );
202 _fbdata_end = _fbdata_start + SIZEOF ( .auxdata ) ;
203 _fbdata_vma = ADDR ( .auxdata );
205 PROVIDE (__FRAME_BUFFER_START = ADDR(.auxbss) );
206 PROVIDE (__FRAME_BUFFER_SIZE = 0x14000);
207 PROVIDE (__FRAME_BUFFER_END = __FRAME_BUFFER_START + __FRAME_BUFFER_SIZE);
209 .dma : { _dma_start = .; *(.dma) _dma_end = .; } >dma-ram
210 .internal_io (NOLOAD) : { *(.internal_io) } >ports
212 /* Stabs debugging sections. */
213 .stab 0 : { *(.stab) }
214 .stabstr 0 : { *(.stabstr) }
215 .stab.excl 0 : { *(.stab.excl) }
216 .stab.exclstr 0 : { *(.stab.exclstr) }
217 .stab.index 0 : { *(.stab.index) }
218 .stab.indexstr 0 : { *(.stab.indexstr) }
219 .comment 0 : { *(.comment) }
220 /* DWARF debug sections.
221 Symbols in the DWARF debugging sections are relative to the beginning
222 of the section so we begin them at 0. */
224 .debug 0 : { *(.debug) }
225 .line 0 : { *(.line) }
226 /* GNU DWARF 1 extensions */
227 .debug_srcinfo 0 : { *(.debug_srcinfo) }
228 .debug_sfnames 0 : { *(.debug_sfnames) }
229 /* DWARF 1.1 and DWARF 2 */
230 .debug_aranges 0 : { *(.debug_aranges) }
231 .debug_pubnames 0 : { *(.debug_pubnames) }
233 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
234 .debug_abbrev 0 : { *(.debug_abbrev) }
235 .debug_line 0 : { *(.debug_line) }
236 .debug_frame 0 : { *(.debug_frame) }
237 .debug_str 0 : { *(.debug_str) }
238 .debug_loc 0 : { *(.debug_loc) }
239 .debug_macinfo 0 : { *(.debug_macinfo) }
240 /* SGI/MIPS DWARF 2 extensions */
241 .debug_weaknames 0 : { *(.debug_weaknames) }
242 .debug_funcnames 0 : { *(.debug_funcnames) }
243 .debug_typenames 0 : { *(.debug_typenames) }
244 .debug_varnames 0 : { *(.debug_varnames) }
246 /* In a multi-core environment, each core is given its own stack space
247 equal to __stack_size, growing downwards. */
248 PROVIDE (__stack = 0x97ff0);
249 PROVIDE (__stack_size = 0x800);
251 .stack (DEFINED(__stack) ? __stack : 0x007ffff0) :
257 /DISCARD/ : { *(.note.GNU-stack) }