1 /* Special linker script for running C executables on simulator */
2 OUTPUT_FORMAT("elf32-iq2000", "elf32-iq2000",
6 /* Do we need any of these for elf?
11 .interp : { *(.interp) }
12 .rel.init : { *(.rel.init) }
13 .rela.init : { *(.rela.init) }
18 *(.rel.gnu.linkonce.t.*)
24 *(.rela.gnu.linkonce.t.*)
26 .rel.fini : { *(.rel.fini) }
27 .rela.fini : { *(.rela.fini) }
32 *(.rel.gnu.linkonce.r.*)
38 *(.rela.gnu.linkonce.r.*)
44 *(.rel.gnu.linkonce.d.*)
50 *(.rela.gnu.linkonce.d.*)
52 .rel.ctors : { *(.rel.ctors) }
53 .rela.ctors : { *(.rela.ctors) }
54 .rel.dtors : { *(.rel.dtors) }
55 .rela.dtors : { *(.rela.dtors) }
56 .rel.got : { *(.rel.got) }
57 .rela.got : { *(.rela.got) }
62 *(.rel.gnu.linkonce.s.*)
68 *(.rela.gnu.linkonce.s.*)
74 *(.rel.gnu.linkonce.sb.*)
80 *(.rela.gnu.linkonce.sb.*)
86 *(.rel.gnu.linkonce.s2.*)
92 *(.rela.gnu.linkonce.s2.*)
98 *(.rel.gnu.linkonce.sb2.*)
104 *(.rela.gnu.linkonce.sb2.*)
110 *(.rel.gnu.linkonce.b.*)
116 *(.rela.gnu.linkonce.b.*)
118 .rel.plt : { *(.rel.plt) }
119 .rela.plt : { *(.rela.plt) }
130 /* .gnu.warning sections are handled specially by elf32.em. */
138 PROVIDE (__etext = .);
139 PROVIDE (_etext = .);
141 /* Adjust the address for the data segment. We want to adjust up to
142 the same address within the page on the next page up. */
151 .data1 : { *(.data1) }
154 PROVIDE (__eh_frame_begin = .);
157 PROVIDE (__eh_frame_end = .);
159 .gcc_except_table : { *(.gcc_except_table) *(.gcc_except_table.*) }
161 .dynsym : { *(.dynsym) }
162 .dynstr : { *(.dynstr) }
163 .gnu.version : { *(.gnu.version) }
164 .gnu.version_d : { *(.gnu.version_d) }
165 .gnu.version_r : { *(.gnu.version_r) }
166 .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
167 .rodata1 : { *(.rodata1) }
168 .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
169 .sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
170 .dynamic : { *(.dynamic) }
174 /* gcc uses crtbegin.o to find the start of
175 the constructors, so we make sure it is
176 first. Because this is a wildcard, it
177 doesn't matter if the user does not
178 actually link against crtbegin.o; the
179 linker won't look for a file to match a
180 wildcard. The wildcard also means that it
181 doesn't matter which directory crtbegin.o
183 KEEP (*crtbegin.o(.ctors))
184 /* We don't want to include the .ctor section from
185 from the crtend.o file until after the sorted ctors.
186 The .ctor section from the crtend file contains the
187 end of ctors marker and it must be last */
188 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
189 KEEP (*(SORT(.ctors.*)))
196 KEEP (*crtbegin.o(.dtors))
197 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
198 KEEP (*(SORT(.dtors.*)))
202 .jcr : { KEEP (*(.jcr)) }
203 .got : { *(.got.plt) *(.got) }
204 /* We want the small data sections together, so single-instruction offsets
205 can access them all, and initialized data all before uninitialized, so
206 we can shorten the on-disk segment size. */
218 PROVIDE (__sbss_start = .);
219 PROVIDE (___sbss_start = .);
223 *(.gnu.linkonce.sb.*)
225 PROVIDE (__sbss_end = .);
226 PROVIDE (___sbss_end = .);
235 /* Align here to ensure that the .bss section occupies space up to
236 _end. Align after .bss to ensure correct alignment even if the
237 .bss section disappears because there are no input sections. */
243 /* Stabs debugging sections. */
244 .stab 0 : { *(.stab) }
245 .stabstr 0 : { *(.stabstr) }
246 .stab.excl 0 : { *(.stab.excl) }
247 .stab.exclstr 0 : { *(.stab.exclstr) }
248 .stab.index 0 : { *(.stab.index) }
249 .stab.indexstr 0 : { *(.stab.indexstr) }
250 .comment 0 : { *(.comment) }
251 /* DWARF debug sections.
252 Symbols in the DWARF debugging sections are relative to the beginning
253 of the section so we begin them at 0. */
255 .debug 0 : { *(.debug) }
256 .line 0 : { *(.line) }
257 /* GNU DWARF 1 extensions */
258 .debug_srcinfo 0 : { *(.debug_srcinfo) }
259 .debug_sfnames 0 : { *(.debug_sfnames) }
260 /* DWARF 1.1 and DWARF 2 */
261 .debug_aranges 0 : { *(.debug_aranges) }
262 .debug_pubnames 0 : { *(.debug_pubnames) }
264 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
265 .debug_abbrev 0 : { *(.debug_abbrev) }
266 .debug_line 0 : { *(.debug_line) }
267 .debug_frame 0 : { *(.debug_frame) }
268 .debug_str 0 : { *(.debug_str) }
269 .debug_loc 0 : { *(.debug_loc) }
270 .debug_macinfo 0 : { *(.debug_macinfo) }
271 .debug_ranges 0 : { *(.debug_ranges) }
272 /* SGI/MIPS DWARF 2 extensions */
273 .debug_weaknames 0 : { *(.debug_weaknames) }
274 .debug_funcnames 0 : { *(.debug_funcnames) }
275 .debug_typenames 0 : { *(.debug_typenames) }
276 .debug_varnames 0 : { *(.debug_varnames) }
277 PROVIDE (__stack = 0x80000);
278 /* These must appear regardless of . */