1 | /* |
---|
2 | * Linker script for CSB350 AU1100 based board |
---|
3 | * |
---|
4 | * $Id$ |
---|
5 | */ |
---|
6 | |
---|
7 | /* . = 0x80020000; */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Declare some sizes. |
---|
11 | */ |
---|
12 | |
---|
13 | _StackSize = DEFINED(_StackSize) ? _StackSize : 0x4000; |
---|
14 | |
---|
15 | _sdram_base = DEFINED(_sdram_base) ? _sdram_base : 0x80400000; |
---|
16 | _sdram_size = DEFINED(_sdram_size) ? _sdram_size : 12M; |
---|
17 | |
---|
18 | |
---|
19 | MEMORY |
---|
20 | { |
---|
21 | ram : ORIGIN = 0x80400000, LENGTH = 4M |
---|
22 | } |
---|
23 | |
---|
24 | SECTIONS |
---|
25 | { |
---|
26 | .text : |
---|
27 | { |
---|
28 | _ftext = . ; |
---|
29 | |
---|
30 | */start.o(.text) |
---|
31 | |
---|
32 | *(.text*) |
---|
33 | *(.gnu.linkonce.t*) |
---|
34 | *(.mips16.fn.*) |
---|
35 | *(.mips16.call.*) |
---|
36 | PROVIDE (__runtime_reloc_start = .); |
---|
37 | *(.rel.sdata) |
---|
38 | *(.rel.dyn) |
---|
39 | PROVIDE (__runtime_reloc_stop = .); |
---|
40 | |
---|
41 | /* |
---|
42 | * Special FreeBSD sysctl sections. |
---|
43 | */ |
---|
44 | . = ALIGN (16); |
---|
45 | __start_set_sysctl_set = .; |
---|
46 | *(set_sysctl_*); |
---|
47 | __stop_set_sysctl_set = ABSOLUTE(.); |
---|
48 | *(set_domain_*); |
---|
49 | *(set_pseudo_*); |
---|
50 | |
---|
51 | *(.gcc_except_table) |
---|
52 | *(.eh_frame_hdr) |
---|
53 | *(.eh_frame) |
---|
54 | } >ram |
---|
55 | |
---|
56 | .init : |
---|
57 | { |
---|
58 | KEEP(*(.init)) |
---|
59 | |
---|
60 | } > ram |
---|
61 | |
---|
62 | .fini : |
---|
63 | { |
---|
64 | KEEP(*(.fini)) |
---|
65 | |
---|
66 | } >ram |
---|
67 | |
---|
68 | |
---|
69 | .ctors : |
---|
70 | { |
---|
71 | /* gcc uses crtbegin.o to find the start of |
---|
72 | the constructors, so we make sure it is |
---|
73 | first. Because this is a wildcard, it |
---|
74 | doesn't matter if the user does not |
---|
75 | actually link against crtbegin.o; the |
---|
76 | linker won't look for a file to match a |
---|
77 | wildcard. The wildcard also means that it |
---|
78 | doesn't matter which directory crtbegin.o |
---|
79 | is in. */ |
---|
80 | |
---|
81 | KEEP (*crtbegin.o(.ctors)) |
---|
82 | |
---|
83 | /* We don't want to include the .ctor section from |
---|
84 | from the crtend.o file until after the sorted ctors. |
---|
85 | The .ctor section from the crtend file contains the |
---|
86 | end of ctors marker and it must be last */ |
---|
87 | |
---|
88 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) |
---|
89 | KEEP (*(SORT(.ctors.*))) |
---|
90 | KEEP (*(.ctors)) |
---|
91 | } >ram |
---|
92 | |
---|
93 | .dtors : |
---|
94 | { |
---|
95 | KEEP (*crtbegin.o(.dtors)) |
---|
96 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) |
---|
97 | KEEP (*(SORT(.dtors.*))) |
---|
98 | KEEP (*(.dtors)) |
---|
99 | |
---|
100 | etext = .; |
---|
101 | _etext = .; |
---|
102 | } >ram |
---|
103 | |
---|
104 | |
---|
105 | |
---|
106 | .rdata : |
---|
107 | { |
---|
108 | *(.rdata) |
---|
109 | *(.rodata) |
---|
110 | *(.rodata.*) |
---|
111 | *(.gnu.linkonce.r*) |
---|
112 | } >ram |
---|
113 | |
---|
114 | .data : |
---|
115 | { |
---|
116 | _fdata = ALIGN(16); |
---|
117 | |
---|
118 | *(.data) |
---|
119 | *(.data.*) |
---|
120 | *(.gnu.linkonce.d*) |
---|
121 | } >ram |
---|
122 | |
---|
123 | .jcr : |
---|
124 | { |
---|
125 | . = ALIGN(8); |
---|
126 | KEEP (*(.jcr)) |
---|
127 | |
---|
128 | _gp = ALIGN(16) + 0x7440; |
---|
129 | __global = _gp; |
---|
130 | } >ram |
---|
131 | |
---|
132 | .lit8 : |
---|
133 | { |
---|
134 | *(.lit8) |
---|
135 | } >ram |
---|
136 | |
---|
137 | .lit4 : |
---|
138 | { |
---|
139 | *(.lit4) |
---|
140 | } >ram |
---|
141 | |
---|
142 | .sdata : |
---|
143 | { |
---|
144 | *(.sdata*) |
---|
145 | *(.gnu.linkonce.s*) |
---|
146 | } >ram |
---|
147 | |
---|
148 | .sbss : |
---|
149 | { |
---|
150 | edata = .; |
---|
151 | _edata = .; |
---|
152 | _fbss = .; |
---|
153 | *(.sbss*) |
---|
154 | *(.scommon) |
---|
155 | } >ram |
---|
156 | |
---|
157 | |
---|
158 | .bss : |
---|
159 | { |
---|
160 | _bss_start = . ; |
---|
161 | *(.bss*) |
---|
162 | *(.reginfo) |
---|
163 | *(COMMON) |
---|
164 | . = ALIGN (64); |
---|
165 | _stack_limit = .; |
---|
166 | . += _StackSize; |
---|
167 | __stack = .; |
---|
168 | _stack_init = .; |
---|
169 | _clear_end = .; |
---|
170 | end = .; |
---|
171 | _end = .; |
---|
172 | . = ALIGN (1024); |
---|
173 | _bss_free_start = .; |
---|
174 | |
---|
175 | } >ram |
---|
176 | |
---|
177 | |
---|
178 | /* |
---|
179 | ** DWARF debug sections. |
---|
180 | ** Symbols in the DWARF debugging sections are relative to |
---|
181 | ** the beginning of the section so we begin them at 0. |
---|
182 | */ |
---|
183 | |
---|
184 | /* DWARF 1 */ |
---|
185 | .debug 0 : { *(.debug) } |
---|
186 | .line 0 : { *(.line) } |
---|
187 | |
---|
188 | /* GNU DWARF 1 extensions */ |
---|
189 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
190 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
191 | |
---|
192 | /* DWARF 1.1 and DWARF 2 */ |
---|
193 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
194 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
195 | |
---|
196 | /* DWARF 2 */ |
---|
197 | .debug_info 0 : { *(.debug_info) } |
---|
198 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
199 | .debug_line 0 : { *(.debug_line) } |
---|
200 | .debug_frame 0 : { *(.debug_frame)} |
---|
201 | .debug_str 0 : { *(.debug_str) } |
---|
202 | .debug_loc 0 : { *(.debug_loc) } |
---|
203 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
204 | |
---|
205 | /* SGI/MIPS DWARF 2 extensions */ |
---|
206 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
207 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
208 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
209 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
210 | } |
---|