1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup bsp_linker |
---|
5 | * |
---|
6 | * @brief Linker command base file. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2008-2015 embedded brains GmbH. All rights reserved. |
---|
11 | * |
---|
12 | * embedded brains GmbH |
---|
13 | * Dornierstr. 4 |
---|
14 | * 82178 Puchheim |
---|
15 | * Germany |
---|
16 | * <rtems@embedded-brains.de> |
---|
17 | * |
---|
18 | * The license and distribution terms for this file may be |
---|
19 | * found in the file LICENSE in this distribution or at |
---|
20 | * http://www.rtems.org/license/LICENSE. |
---|
21 | */ |
---|
22 | |
---|
23 | OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") |
---|
24 | |
---|
25 | OUTPUT_ARCH (arm) |
---|
26 | |
---|
27 | ENTRY (_start) |
---|
28 | |
---|
29 | /* |
---|
30 | * Global symbols that may be defined externally |
---|
31 | */ |
---|
32 | |
---|
33 | bsp_vector_table_size = DEFINED (bsp_vector_table_size) ? bsp_vector_table_size : 64; |
---|
34 | |
---|
35 | bsp_section_xbarrier_align = DEFINED (bsp_section_xbarrier_align) ? bsp_section_xbarrier_align : 1; |
---|
36 | bsp_section_robarrier_align = DEFINED (bsp_section_robarrier_align) ? bsp_section_robarrier_align : 1; |
---|
37 | bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1; |
---|
38 | |
---|
39 | bsp_stack_align = DEFINED (bsp_stack_align) ? bsp_stack_align : 8; |
---|
40 | |
---|
41 | bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 0; |
---|
42 | bsp_stack_abt_size = ALIGN (bsp_stack_abt_size, bsp_stack_align); |
---|
43 | |
---|
44 | bsp_stack_fiq_size = DEFINED (bsp_stack_fiq_size) ? bsp_stack_fiq_size : 0; |
---|
45 | bsp_stack_fiq_size = ALIGN (bsp_stack_fiq_size, bsp_stack_align); |
---|
46 | |
---|
47 | bsp_stack_irq_size = DEFINED (bsp_stack_irq_size) ? bsp_stack_irq_size : 0; |
---|
48 | bsp_stack_irq_size = ALIGN (bsp_stack_irq_size, bsp_stack_align); |
---|
49 | |
---|
50 | bsp_stack_svc_size = DEFINED (bsp_stack_svc_size) ? bsp_stack_svc_size : 0; |
---|
51 | bsp_stack_svc_size = ALIGN (bsp_stack_svc_size, bsp_stack_align); |
---|
52 | |
---|
53 | bsp_stack_und_size = DEFINED (bsp_stack_und_size) ? bsp_stack_und_size : 0; |
---|
54 | bsp_stack_und_size = ALIGN (bsp_stack_und_size, bsp_stack_align); |
---|
55 | |
---|
56 | bsp_stack_main_size = DEFINED (bsp_stack_main_size) ? bsp_stack_main_size : 0; |
---|
57 | bsp_stack_main_size = ALIGN (bsp_stack_main_size, bsp_stack_align); |
---|
58 | |
---|
59 | bsp_stack_all_size = bsp_stack_abt_size + bsp_stack_fiq_size + bsp_stack_irq_size + bsp_stack_svc_size + bsp_stack_und_size + bsp_stack_main_size; |
---|
60 | |
---|
61 | bsp_processor_count = DEFINED (bsp_processor_count) ? bsp_processor_count : 1; |
---|
62 | |
---|
63 | MEMORY { |
---|
64 | UNEXPECTED_SECTIONS : ORIGIN = 0xffffffff, LENGTH = 0 |
---|
65 | } |
---|
66 | |
---|
67 | SECTIONS { |
---|
68 | .start : ALIGN_WITH_INPUT { |
---|
69 | bsp_section_start_begin = .; |
---|
70 | KEEP (*(.bsp_start_text)) |
---|
71 | KEEP (*(.bsp_start_data)) |
---|
72 | bsp_section_start_end = .; |
---|
73 | } > REGION_START AT > REGION_START |
---|
74 | bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin; |
---|
75 | |
---|
76 | .xbarrier : ALIGN_WITH_INPUT { |
---|
77 | . = ALIGN (bsp_section_xbarrier_align); |
---|
78 | } > REGION_VECTOR AT > REGION_VECTOR |
---|
79 | |
---|
80 | .text : ALIGN_WITH_INPUT { |
---|
81 | bsp_section_text_begin = .; |
---|
82 | *(.text.unlikely .text.*_unlikely) |
---|
83 | *(.text .stub .text.* .gnu.linkonce.t.*) |
---|
84 | /* .gnu.warning sections are handled specially by elf32.em. */ |
---|
85 | *(.gnu.warning) |
---|
86 | *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) |
---|
87 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
88 | .init : ALIGN_WITH_INPUT { |
---|
89 | KEEP (*(.init)) |
---|
90 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
91 | .fini : ALIGN_WITH_INPUT { |
---|
92 | KEEP (*(.fini)) |
---|
93 | bsp_section_text_end = .; |
---|
94 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
95 | bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin; |
---|
96 | bsp_section_text_load_begin = LOADADDR (.text); |
---|
97 | bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size; |
---|
98 | |
---|
99 | .robarrier : ALIGN_WITH_INPUT { |
---|
100 | . = ALIGN (bsp_section_robarrier_align); |
---|
101 | } > REGION_RODATA AT > REGION_RODATA |
---|
102 | |
---|
103 | .rodata : ALIGN_WITH_INPUT { |
---|
104 | bsp_section_rodata_begin = .; |
---|
105 | *(.rodata .rodata.* .gnu.linkonce.r.*) |
---|
106 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
107 | .rodata1 : ALIGN_WITH_INPUT { |
---|
108 | *(.rodata1) |
---|
109 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
110 | .ARM.extab : ALIGN_WITH_INPUT { |
---|
111 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
---|
112 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
113 | .ARM.exidx : ALIGN_WITH_INPUT { |
---|
114 | __exidx_start = .; |
---|
115 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
---|
116 | __exidx_end = .; |
---|
117 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
118 | .eh_frame : ALIGN_WITH_INPUT { |
---|
119 | KEEP (*(.eh_frame)) |
---|
120 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
121 | .gcc_except_table : ALIGN_WITH_INPUT { |
---|
122 | *(.gcc_except_table .gcc_except_table.*) |
---|
123 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
124 | .tdata : ALIGN_WITH_INPUT { |
---|
125 | _TLS_Data_begin = .; |
---|
126 | *(.tdata .tdata.* .gnu.linkonce.td.*) |
---|
127 | _TLS_Data_end = .; |
---|
128 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
129 | .tbss : ALIGN_WITH_INPUT { |
---|
130 | _TLS_BSS_begin = .; |
---|
131 | *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) |
---|
132 | _TLS_BSS_end = .; |
---|
133 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
134 | _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin; |
---|
135 | _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin; |
---|
136 | _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin; |
---|
137 | _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin; |
---|
138 | _TLS_Size = _TLS_BSS_end - _TLS_Data_begin; |
---|
139 | _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss)); |
---|
140 | .preinit_array : ALIGN_WITH_INPUT { |
---|
141 | PROVIDE_HIDDEN (__preinit_array_start = .); |
---|
142 | KEEP (*(.preinit_array)) |
---|
143 | PROVIDE_HIDDEN (__preinit_array_end = .); |
---|
144 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
145 | .init_array : ALIGN_WITH_INPUT { |
---|
146 | PROVIDE_HIDDEN (__init_array_start = .); |
---|
147 | KEEP (*(SORT(.init_array.*))) |
---|
148 | KEEP (*(.init_array)) |
---|
149 | PROVIDE_HIDDEN (__init_array_end = .); |
---|
150 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
151 | .fini_array : ALIGN_WITH_INPUT { |
---|
152 | PROVIDE_HIDDEN (__fini_array_start = .); |
---|
153 | KEEP (*(.fini_array)) |
---|
154 | KEEP (*(SORT(.fini_array.*))) |
---|
155 | PROVIDE_HIDDEN (__fini_array_end = .); |
---|
156 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
157 | .ctors : ALIGN_WITH_INPUT { |
---|
158 | /* gcc uses crtbegin.o to find the start of |
---|
159 | the constructors, so we make sure it is |
---|
160 | first. Because this is a wildcard, it |
---|
161 | doesn't matter if the user does not |
---|
162 | actually link against crtbegin.o; the |
---|
163 | linker won't look for a file to match a |
---|
164 | wildcard. The wildcard also means that it |
---|
165 | doesn't matter which directory crtbegin.o |
---|
166 | is in. */ |
---|
167 | KEEP (*crtbegin.o(.ctors)) |
---|
168 | KEEP (*crtbegin?.o(.ctors)) |
---|
169 | /* We don't want to include the .ctor section from |
---|
170 | the crtend.o file until after the sorted ctors. |
---|
171 | The .ctor section from the crtend file contains the |
---|
172 | end of ctors marker and it must be last */ |
---|
173 | KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) |
---|
174 | KEEP (*(SORT(.ctors.*))) |
---|
175 | KEEP (*(.ctors)) |
---|
176 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
177 | .dtors : ALIGN_WITH_INPUT { |
---|
178 | KEEP (*crtbegin.o(.dtors)) |
---|
179 | KEEP (*crtbegin?.o(.dtors)) |
---|
180 | KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) |
---|
181 | KEEP (*(SORT(.dtors.*))) |
---|
182 | KEEP (*(.dtors)) |
---|
183 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
184 | .data.rel.ro : ALIGN_WITH_INPUT { |
---|
185 | *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) |
---|
186 | *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) |
---|
187 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
188 | .jcr : ALIGN_WITH_INPUT { |
---|
189 | KEEP (*(.jcr)) |
---|
190 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
191 | .interp : ALIGN_WITH_INPUT { |
---|
192 | *(.interp) |
---|
193 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
194 | .note.gnu.build-id : ALIGN_WITH_INPUT { |
---|
195 | *(.note.gnu.build-id) |
---|
196 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
197 | .hash : ALIGN_WITH_INPUT { |
---|
198 | *(.hash) |
---|
199 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
200 | .gnu.hash : ALIGN_WITH_INPUT { |
---|
201 | *(.gnu.hash) |
---|
202 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
203 | .dynsym : ALIGN_WITH_INPUT { |
---|
204 | *(.dynsym) |
---|
205 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
206 | .dynstr : ALIGN_WITH_INPUT { |
---|
207 | *(.dynstr) |
---|
208 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
209 | .gnu.version : ALIGN_WITH_INPUT { |
---|
210 | *(.gnu.version) |
---|
211 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
212 | .gnu.version_d : ALIGN_WITH_INPUT { |
---|
213 | *(.gnu.version_d) |
---|
214 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
215 | .gnu.version_r : ALIGN_WITH_INPUT { |
---|
216 | *(.gnu.version_r) |
---|
217 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
218 | .rel.dyn : ALIGN_WITH_INPUT { |
---|
219 | *(.rel.init) |
---|
220 | *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) |
---|
221 | *(.rel.fini) |
---|
222 | *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) |
---|
223 | *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) |
---|
224 | *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) |
---|
225 | *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) |
---|
226 | *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) |
---|
227 | *(.rel.ctors) |
---|
228 | *(.rel.dtors) |
---|
229 | *(.rel.got) |
---|
230 | *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) |
---|
231 | PROVIDE_HIDDEN (__rel_iplt_start = .); |
---|
232 | *(.rel.iplt) |
---|
233 | PROVIDE_HIDDEN (__rel_iplt_end = .); |
---|
234 | PROVIDE_HIDDEN (__rela_iplt_start = .); |
---|
235 | PROVIDE_HIDDEN (__rela_iplt_end = .); |
---|
236 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
237 | .rela.dyn : ALIGN_WITH_INPUT { |
---|
238 | *(.rela.init) |
---|
239 | *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) |
---|
240 | *(.rela.fini) |
---|
241 | *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) |
---|
242 | *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) |
---|
243 | *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) |
---|
244 | *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) |
---|
245 | *(.rela.ctors) |
---|
246 | *(.rela.dtors) |
---|
247 | *(.rela.got) |
---|
248 | *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) |
---|
249 | PROVIDE_HIDDEN (__rel_iplt_start = .); |
---|
250 | PROVIDE_HIDDEN (__rel_iplt_end = .); |
---|
251 | PROVIDE_HIDDEN (__rela_iplt_start = .); |
---|
252 | *(.rela.iplt) |
---|
253 | PROVIDE_HIDDEN (__rela_iplt_end = .); |
---|
254 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
255 | .rel.plt : ALIGN_WITH_INPUT { |
---|
256 | *(.rel.plt) |
---|
257 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
258 | .rela.plt : ALIGN_WITH_INPUT { |
---|
259 | *(.rela.plt) |
---|
260 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
261 | .plt : ALIGN_WITH_INPUT { |
---|
262 | *(.plt) |
---|
263 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
264 | .iplt : ALIGN_WITH_INPUT { |
---|
265 | *(.iplt) |
---|
266 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
267 | .dynamic : ALIGN_WITH_INPUT { |
---|
268 | *(.dynamic) |
---|
269 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
270 | .got : ALIGN_WITH_INPUT { |
---|
271 | *(.got.plt) *(.igot.plt) *(.got) *(.igot) |
---|
272 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
273 | .rtemsroset : ALIGN_WITH_INPUT { |
---|
274 | /* Special FreeBSD linker set sections */ |
---|
275 | __start_set_sysctl_set = .; |
---|
276 | *(set_sysctl_*); |
---|
277 | __stop_set_sysctl_set = .; |
---|
278 | *(set_domain_*); |
---|
279 | *(set_pseudo_*); |
---|
280 | |
---|
281 | KEEP (*(SORT(.rtemsroset.*))) |
---|
282 | bsp_section_rodata_end = .; |
---|
283 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
284 | bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin; |
---|
285 | bsp_section_rodata_load_begin = LOADADDR (.rodata); |
---|
286 | bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size; |
---|
287 | |
---|
288 | .rwbarrier : ALIGN_WITH_INPUT { |
---|
289 | . = ALIGN (bsp_section_rwbarrier_align); |
---|
290 | } > REGION_DATA AT > REGION_DATA |
---|
291 | |
---|
292 | .vector : ALIGN_WITH_INPUT { |
---|
293 | bsp_section_vector_begin = .; |
---|
294 | |
---|
295 | . = . + DEFINED (bsp_vector_table_in_start_section) ? 0 : bsp_vector_table_size; |
---|
296 | |
---|
297 | . = ALIGN (bsp_stack_align); |
---|
298 | |
---|
299 | bsp_stack_irq_begin = .; |
---|
300 | . = . + bsp_stack_irq_size; |
---|
301 | bsp_stack_irq_end = .; |
---|
302 | |
---|
303 | bsp_stack_svc_begin = .; |
---|
304 | . = . + bsp_stack_svc_size; |
---|
305 | bsp_stack_svc_end = .; |
---|
306 | |
---|
307 | bsp_stack_fiq_begin = .; |
---|
308 | . = . + bsp_stack_fiq_size; |
---|
309 | bsp_stack_fiq_end = .; |
---|
310 | |
---|
311 | bsp_stack_und_begin = .; |
---|
312 | . = . + bsp_stack_und_size; |
---|
313 | bsp_stack_und_end = .; |
---|
314 | |
---|
315 | bsp_stack_abt_begin = .; |
---|
316 | . = . + bsp_stack_abt_size; |
---|
317 | bsp_stack_abt_end = .; |
---|
318 | |
---|
319 | bsp_stack_main_begin = .; |
---|
320 | . = . + bsp_stack_main_size; |
---|
321 | bsp_stack_main_end = .; |
---|
322 | |
---|
323 | bsp_stack_secondary_processors_begin = .; |
---|
324 | . = . + (bsp_processor_count - 1) * bsp_stack_all_size; |
---|
325 | bsp_stack_secondary_processors_end = .; |
---|
326 | |
---|
327 | *(.bsp_vector) |
---|
328 | bsp_section_vector_end = .; |
---|
329 | } > REGION_VECTOR AT > REGION_VECTOR |
---|
330 | bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin; |
---|
331 | bsp_vector_table_begin = DEFINED (bsp_vector_table_in_start_section) ? bsp_section_start_begin : bsp_section_vector_begin; |
---|
332 | bsp_vector_table_end = bsp_vector_table_begin + bsp_vector_table_size; |
---|
333 | |
---|
334 | .fast_text : ALIGN_WITH_INPUT { |
---|
335 | bsp_section_fast_text_begin = .; |
---|
336 | *(.bsp_fast_text) |
---|
337 | bsp_section_fast_text_end = .; |
---|
338 | } > REGION_FAST_TEXT AT > REGION_FAST_TEXT_LOAD |
---|
339 | bsp_section_fast_text_size = bsp_section_fast_text_end - bsp_section_fast_text_begin; |
---|
340 | bsp_section_fast_text_load_begin = LOADADDR (.fast_text); |
---|
341 | bsp_section_fast_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size; |
---|
342 | |
---|
343 | .fast_data : ALIGN_WITH_INPUT { |
---|
344 | bsp_section_fast_data_begin = .; |
---|
345 | *(.bsp_fast_data) |
---|
346 | bsp_section_fast_data_end = .; |
---|
347 | } > REGION_FAST_DATA AT > REGION_FAST_DATA_LOAD |
---|
348 | bsp_section_fast_data_size = bsp_section_fast_data_end - bsp_section_fast_data_begin; |
---|
349 | bsp_section_fast_data_load_begin = LOADADDR (.fast_data); |
---|
350 | bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size; |
---|
351 | |
---|
352 | .data : ALIGN_WITH_INPUT { |
---|
353 | bsp_section_data_begin = .; |
---|
354 | *(.data .data.* .gnu.linkonce.d.*) |
---|
355 | SORT(CONSTRUCTORS) |
---|
356 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
357 | .data1 : ALIGN_WITH_INPUT { |
---|
358 | *(.data1) |
---|
359 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
360 | .rtemsrwset : ALIGN_WITH_INPUT { |
---|
361 | KEEP (*(SORT(.rtemsrwset.*))) |
---|
362 | bsp_section_data_end = .; |
---|
363 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
364 | bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin; |
---|
365 | bsp_section_data_load_begin = LOADADDR (.data); |
---|
366 | bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size; |
---|
367 | |
---|
368 | .bss : ALIGN_WITH_INPUT { |
---|
369 | bsp_section_bss_begin = .; |
---|
370 | *(.dynbss) |
---|
371 | *(.bss .bss.* .gnu.linkonce.b.*) |
---|
372 | *(COMMON) |
---|
373 | bsp_section_bss_end = .; |
---|
374 | } > REGION_BSS AT > REGION_BSS |
---|
375 | bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin; |
---|
376 | |
---|
377 | .work : ALIGN_WITH_INPUT { |
---|
378 | /* |
---|
379 | * The work section will occupy the remaining REGION_WORK region and |
---|
380 | * contains the RTEMS work space and heap. |
---|
381 | */ |
---|
382 | bsp_section_work_begin = .; |
---|
383 | . += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.); |
---|
384 | bsp_section_work_end = .; |
---|
385 | } > REGION_WORK AT > REGION_WORK |
---|
386 | bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin; |
---|
387 | |
---|
388 | .stack : ALIGN_WITH_INPUT { |
---|
389 | /* |
---|
390 | * The stack section will occupy the remaining REGION_STACK region and may |
---|
391 | * contain the task stacks. Depending on the region distribution this |
---|
392 | * section may be of zero size. |
---|
393 | */ |
---|
394 | bsp_section_stack_begin = .; |
---|
395 | . += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.); |
---|
396 | bsp_section_stack_end = .; |
---|
397 | } > REGION_STACK AT > REGION_STACK |
---|
398 | bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin; |
---|
399 | |
---|
400 | .nocache : ALIGN_WITH_INPUT { |
---|
401 | bsp_section_nocache_begin = .; |
---|
402 | *(SORT(.bsp_nocache*)) |
---|
403 | bsp_section_nocache_end = .; |
---|
404 | } > REGION_NOCACHE AT > REGION_NOCACHE_LOAD |
---|
405 | bsp_section_nocache_size = bsp_section_nocache_end - bsp_section_nocache_begin; |
---|
406 | bsp_section_nocache_load_begin = LOADADDR (.nocache); |
---|
407 | bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size; |
---|
408 | |
---|
409 | .nocacheheap (NOLOAD) : ALIGN_WITH_INPUT { |
---|
410 | bsp_section_nocacheheap_begin = .; |
---|
411 | . += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.); |
---|
412 | bsp_section_nocacheheap_end = .; |
---|
413 | } > REGION_NOCACHE AT > REGION_NOCACHE |
---|
414 | bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - bsp_section_nocacheheap_begin; |
---|
415 | |
---|
416 | /* FIXME */ |
---|
417 | RamBase = ORIGIN (REGION_WORK); |
---|
418 | RamSize = LENGTH (REGION_WORK); |
---|
419 | WorkAreaBase = bsp_section_work_begin; |
---|
420 | HeapSize = 0; |
---|
421 | |
---|
422 | /* Stabs debugging sections. */ |
---|
423 | .stab 0 : { *(.stab) } |
---|
424 | .stabstr 0 : { *(.stabstr) } |
---|
425 | .stab.excl 0 : { *(.stab.excl) } |
---|
426 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
427 | .stab.index 0 : { *(.stab.index) } |
---|
428 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
429 | .comment 0 : { *(.comment) } |
---|
430 | /* DWARF debug sections. |
---|
431 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
432 | of the section so we begin them at 0. */ |
---|
433 | /* DWARF 1 */ |
---|
434 | .debug 0 : { *(.debug) } |
---|
435 | .line 0 : { *(.line) } |
---|
436 | /* GNU DWARF 1 extensions */ |
---|
437 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
438 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
439 | /* DWARF 1.1 and DWARF 2 */ |
---|
440 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
441 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
442 | /* DWARF 2 */ |
---|
443 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } |
---|
444 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
445 | .debug_line 0 : { *(.debug_line) } |
---|
446 | .debug_frame 0 : { *(.debug_frame) } |
---|
447 | .debug_str 0 : { *(.debug_str) } |
---|
448 | .debug_loc 0 : { *(.debug_loc) } |
---|
449 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
450 | /* SGI/MIPS DWARF 2 extensions */ |
---|
451 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
452 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
453 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
454 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
455 | /* DWARF 3 */ |
---|
456 | .debug_pubtypes 0 : { *(.debug_pubtypes) } |
---|
457 | .debug_ranges 0 : { *(.debug_ranges) } |
---|
458 | /* DWARF extension */ |
---|
459 | .debug_macro 0 : { *(.debug_macro) } |
---|
460 | .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } |
---|
461 | .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } |
---|
462 | /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } |
---|
463 | |
---|
464 | /* |
---|
465 | * This is a RTEMS specific section to catch all unexpected input |
---|
466 | * sections. In case you get an error like |
---|
467 | * "section `.unexpected_sections' will not fit in region |
---|
468 | * `UNEXPECTED_SECTIONS'" |
---|
469 | * you have to figure out the offending input section and add it to the |
---|
470 | * appropriate output section definition above. |
---|
471 | */ |
---|
472 | .unexpected_sections : { *(*) } > UNEXPECTED_SECTIONS |
---|
473 | } |
---|