filename | test/dc.x |
changeset | 185:6755a04c447f |
next | 1169:23a9613aceb1 |
author | nkeynes |
date | Mon Feb 05 08:52:59 2007 +0000 (17 years ago) |
permissions | -rw-r--r-- |
last change | Fix compressed mipmap textures (byte count was wrong) Change internal gl format to the simple versions - let the implementation use whatever's most efficient |
view | annotate | diff | log | raw |
1 /* Sega Dreamcast linker script */
3 OUTPUT_FORMAT("elf32-shl", "elf32-shl",
4 "elf32-shl")
5 OUTPUT_ARCH(sh)
6 ENTRY(start)
7 SEARCH_DIR(/usr/local/dcdev/sh-elf/lib);
8 /* Do we need any of these for elf?
9 __DYNAMIC = 0; */
11 MEMORY
12 {
13 ram (rwx) : ORIGIN = 0x8c010000, LENGTH = 0xfe0000
14 }
16 SECTIONS
17 {
18 /* Read-only sections, merged into text segment: */
19 /* . = 0x1000;*/
20 .interp : { *(.interp) }
21 .hash : { *(.hash) }
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) }
29 .rel.text :
30 {
31 *(.rel.text)
32 *(.rel.text.*)
33 *(.rel.gnu.linkonce.t*)
34 }
35 .rela.text :
36 {
37 *(.rela.text)
38 *(.rela.text.*)
39 *(.rela.gnu.linkonce.t*)
40 }
41 .rel.fini : { *(.rel.fini) }
42 .rela.fini : { *(.rela.fini) }
43 .rel.rodata :
44 {
45 *(.rel.rodata)
46 *(.rel.rodata.*)
47 *(.rel.gnu.linkonce.r*)
48 }
49 .rela.rodata :
50 {
51 *(.rela.rodata)
52 *(.rela.rodata.*)
53 *(.rela.gnu.linkonce.r*)
54 }
55 .rel.data :
56 {
57 *(.rel.data)
58 *(.rel.data.*)
59 *(.rel.gnu.linkonce.d*)
60 }
61 .rela.data :
62 {
63 *(.rela.data)
64 *(.rela.data.*)
65 *(.rela.gnu.linkonce.d*)
66 }
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) }
73 .rel.sdata :
74 {
75 *(.rel.sdata)
76 *(.rel.sdata.*)
77 *(.rel.gnu.linkonce.s*)
78 }
79 .rela.sdata :
80 {
81 *(.rela.sdata)
82 *(.rela.sdata.*)
83 *(.rela.gnu.linkonce.s*)
84 }
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) }
91 .init :
92 {
93 KEEP (*(.init))
94 } =0
95 .plt : { *(.plt) }
96 .text :
97 {
98 *(.text)
99 *(.text.*)
100 *(.stub)
101 /* .gnu.warning sections are handled specially by elf32.em. */
102 *(.gnu.warning)
103 *(.gnu.linkonce.t*)
104 } =0
105 _etext = .;
106 PROVIDE (etext = .);
107 .fini :
108 {
109 KEEP (*(.fini))
110 } =0
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));
116 .data :
117 {
118 *(.data)
119 *(.data.*)
120 *(.gnu.linkonce.d*)
121 SORT(CONSTRUCTORS)
122 }
123 .data1 : { *(.data1) }
124 .eh_frame : { *(.eh_frame) }
125 .gcc_except_table : { *(.gcc_except_table) }
126 .ctors ALIGN(4):
127 {
128 ___ctors = .;
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
137 is in. */
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.*)))
145 KEEP (*(.ctors))
146 ___ctors_end = .;
147 }
148 .dtors :
149 {
150 ___dtors = .;
151 KEEP (*crtbegin.o(.dtors))
152 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
153 KEEP (*(SORT(.dtors.*)))
154 KEEP (*(.dtors))
155 ___dtors_end = .;
156 }
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. */
162 .sdata :
163 {
164 *(.sdata)
165 *(.sdata.*)
166 *(.gnu.linkonce.s.*)
167 }
168 _edata = .;
169 PROVIDE (edata = .);
170 __bss_start = .;
171 .sbss :
172 {
173 *(.dynsbss)
174 *(.sbss)
175 *(.sbss.*)
176 *(.scommon)
177 }
178 .bss :
179 {
180 *(.dynbss)
181 *(.bss)
182 *(.bss.*)
183 *(COMMON)
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. */
187 . = ALIGN(32 / 8);
188 }
189 . = ALIGN(32 / 8);
190 _end = .;
191 PROVIDE (end = .);
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. */
203 /* DWARF 1 */
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) }
212 /* DWARF 2 */
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 . */
227 _stack = 0x8d000000;
228 }
.