1 /* Sega Dreamcast linker script */
3 OUTPUT_FORMAT("elf32-shl", "elf32-shl",
7 SEARCH_DIR(/usr/local/dcdev/sh-elf/lib);
8 /* Do we need any of these for elf?
13 ram (rwx) : ORIGIN = 0x8c010000, LENGTH = 0xfe0000
18 /* Read-only sections, merged into text segment: */
20 .interp : { *(.interp) }
22 .dynsym : { *(.dynsym) }
23 .dynstr : { *(.dynstr) }
24 .gnu.version : { *(.gnu.version) }
25 .gnu.version_d : { *(.gnu.version_d) }
26 .gnu.version_r : { *(.gnu.version_r) }
27 .rel.init : { *(.rel.init) }
28 .rela.init : { *(.rela.init) }
33 *(.rel.gnu.linkonce.t*)
39 *(.rela.gnu.linkonce.t*)
41 .rel.fini : { *(.rel.fini) }
42 .rela.fini : { *(.rela.fini) }
47 *(.rel.gnu.linkonce.r*)
53 *(.rela.gnu.linkonce.r*)
59 *(.rel.gnu.linkonce.d*)
65 *(.rela.gnu.linkonce.d*)
67 .rel.ctors : { *(.rel.ctors) }
68 .rela.ctors : { *(.rela.ctors) }
69 .rel.dtors : { *(.rel.dtors) }
70 .rela.dtors : { *(.rela.dtors) }
71 .rel.got : { *(.rel.got) }
72 .rela.got : { *(.rela.got) }
77 *(.rel.gnu.linkonce.s*)
83 *(.rela.gnu.linkonce.s*)
85 .rel.sbss : { *(.rel.sbss) }
86 .rela.sbss : { *(.rela.sbss) }
87 .rel.bss : { *(.rel.bss) }
88 .rela.bss : { *(.rela.bss) }
89 .rel.plt : { *(.rel.plt) }
90 .rela.plt : { *(.rela.plt) }
101 /* .gnu.warning sections are handled specially by elf32.em. */
111 .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) }
112 .rodata1 : { *(.rodata1) }
113 /* Adjust the address for the data segment. We want to adjust up to
114 the same address within the page on the next page up. */
115 . = ALIGN(128) + (. & (128 - 1));
123 .data1 : { *(.data1) }
124 .eh_frame : { *(.eh_frame) }
125 .gcc_except_table : { *(.gcc_except_table) }
129 /* gcc uses crtbegin.o to find the start of
130 the constructors, so we make sure it is
131 first. Because this is a wildcard, it
132 doesn't matter if the user does not
133 actually link against crtbegin.o; the
134 linker won't look for a file to match a
135 wildcard. The wildcard also means that it
136 doesn't matter which directory crtbegin.o
138 KEEP (*crtbegin.o(.ctors))
139 /* We don't want to include the .ctor section from
140 from the crtend.o file until after the sorted ctors.
141 The .ctor section from the crtend file contains the
142 end of ctors marker and it must be last */
143 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
144 KEEP (*(SORT(.ctors.*)))
151 KEEP (*crtbegin.o(.dtors))
152 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
153 KEEP (*(SORT(.dtors.*)))
157 .got : { *(.got.plt) *(.got) }
158 .dynamic : { *(.dynamic) }
159 /* We want the small data sections together, so single-instruction offsets
160 can access them all, and initialized data all before uninitialized, so
161 we can shorten the on-disk segment size. */
184 /* Align here to ensure that the .bss section occupies space up to
185 _end. Align after .bss to ensure correct alignment even if the
186 .bss section disappears because there are no input sections. */
192 /* Stabs debugging sections. */
193 .stab 0 : { *(.stab) }
194 .stabstr 0 : { *(.stabstr) }
195 .stab.excl 0 : { *(.stab.excl) }
196 .stab.exclstr 0 : { *(.stab.exclstr) }
197 .stab.index 0 : { *(.stab.index) }
198 .stab.indexstr 0 : { *(.stab.indexstr) }
199 .comment 0 : { *(.comment) }
200 /* DWARF debug sections.
201 Symbols in the DWARF debugging sections are relative to the beginning
202 of the section so we begin them at 0. */
204 .debug 0 : { *(.debug) }
205 .line 0 : { *(.line) }
206 /* GNU DWARF 1 extensions */
207 .debug_srcinfo 0 : { *(.debug_srcinfo) }
208 .debug_sfnames 0 : { *(.debug_sfnames) }
209 /* DWARF 1.1 and DWARF 2 */
210 .debug_aranges 0 : { *(.debug_aranges) }
211 .debug_pubnames 0 : { *(.debug_pubnames) }
213 .debug_info 0 : { *(.debug_info) }
214 .debug_abbrev 0 : { *(.debug_abbrev) }
215 .debug_line 0 : { *(.debug_line) }
216 .debug_frame 0 : { *(.debug_frame) }
217 .debug_str 0 : { *(.debug_str) }
218 .debug_loc 0 : { *(.debug_loc) }
219 .debug_macinfo 0 : { *(.debug_macinfo) }
220 /* SGI/MIPS DWARF 2 extensions */
221 .debug_weaknames 0 : { *(.debug_weaknames) }
222 .debug_funcnames 0 : { *(.debug_funcnames) }
223 .debug_typenames 0 : { *(.debug_typenames) }
224 .debug_varnames 0 : { *(.debug_varnames) }
225 /* .stack 0x8c00f400 : { _stack = .; *(.stack) }*/
226 /* These must appear regardless of . */
.