1 | /* SPDX-License-Identifier: BSD-2-Clause */ |
---|
2 | |
---|
3 | /** |
---|
4 | * @file |
---|
5 | * |
---|
6 | * @ingroup bsp_linker |
---|
7 | * |
---|
8 | * @brief Linker command base file. |
---|
9 | */ |
---|
10 | |
---|
11 | /* |
---|
12 | * Copyright (C) 2020 On-Line Applications Research Corporation (OAR) |
---|
13 | * Written by Kinsey Moore <kinsey.moore@oarcorp.com> |
---|
14 | * |
---|
15 | * Redistribution and use in source and binary forms, with or without |
---|
16 | * modification, are permitted provided that the following conditions |
---|
17 | * are met: |
---|
18 | * 1. Redistributions of source code must retain the above copyright |
---|
19 | * notice, this list of conditions and the following disclaimer. |
---|
20 | * 2. Redistributions in binary form must reproduce the above copyright |
---|
21 | * notice, this list of conditions and the following disclaimer in the |
---|
22 | * documentation and/or other materials provided with the distribution. |
---|
23 | * |
---|
24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
---|
25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
---|
28 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
---|
29 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
---|
30 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
---|
31 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
---|
32 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
---|
33 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
---|
34 | * POSSIBILITY OF SUCH DAMAGE. |
---|
35 | */ |
---|
36 | |
---|
37 | ENTRY (_start) |
---|
38 | STARTUP (start.o) |
---|
39 | |
---|
40 | /* |
---|
41 | * Global symbols that may be defined externally |
---|
42 | */ |
---|
43 | |
---|
44 | bsp_stack_align = DEFINED (bsp_stack_align) ? bsp_stack_align : 16; |
---|
45 | |
---|
46 | bsp_stack_exception_size = DEFINED (bsp_stack_exception_size) ? bsp_stack_exception_size : 0; |
---|
47 | bsp_stack_exception_size = ALIGN (bsp_stack_exception_size, bsp_stack_align); |
---|
48 | |
---|
49 | bsp_vector_table_size = DEFINED (bsp_vector_table_size) ? bsp_vector_table_size : 64; |
---|
50 | |
---|
51 | bsp_section_xbarrier_align = DEFINED (bsp_section_xbarrier_align) ? bsp_section_xbarrier_align : 1; |
---|
52 | bsp_section_robarrier_align = DEFINED (bsp_section_robarrier_align) ? bsp_section_robarrier_align : 1; |
---|
53 | bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1; |
---|
54 | |
---|
55 | bsp_stack_hyp_size = DEFINED (bsp_stack_hyp_size) ? bsp_stack_hyp_size : 0; |
---|
56 | bsp_stack_hyp_size = ALIGN (bsp_stack_hyp_size, bsp_stack_align); |
---|
57 | |
---|
58 | MEMORY { |
---|
59 | UNEXPECTED_SECTIONS : ORIGIN = 0xffffffffffffffff, LENGTH = 0 |
---|
60 | } |
---|
61 | |
---|
62 | SECTIONS { |
---|
63 | .start : ALIGN_WITH_INPUT { |
---|
64 | bsp_section_start_begin = .; |
---|
65 | KEEP (*(.bsp_start_text)) |
---|
66 | KEEP (*(.bsp_start_data)) |
---|
67 | bsp_section_start_end = .; |
---|
68 | } > REGION_START AT > REGION_START |
---|
69 | bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin; |
---|
70 | |
---|
71 | .xbarrier : ALIGN_WITH_INPUT { |
---|
72 | . = ALIGN (bsp_section_xbarrier_align); |
---|
73 | } > REGION_VECTOR AT > REGION_VECTOR |
---|
74 | |
---|
75 | .text : ALIGN_WITH_INPUT { |
---|
76 | bsp_section_text_begin = .; |
---|
77 | *(.text.unlikely .text.*_unlikely) |
---|
78 | *(.text .stub .text.* .gnu.linkonce.t.*) |
---|
79 | /* .gnu.warning sections are handled specially by elf32.em. */ |
---|
80 | *(.gnu.warning) |
---|
81 | *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx) |
---|
82 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
83 | .init : ALIGN_WITH_INPUT { |
---|
84 | KEEP (*(.init)) |
---|
85 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
86 | .fini : ALIGN_WITH_INPUT { |
---|
87 | KEEP (*(.fini)) |
---|
88 | bsp_section_text_end = .; |
---|
89 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
90 | bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin; |
---|
91 | bsp_section_text_load_begin = LOADADDR (.text); |
---|
92 | bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size; |
---|
93 | |
---|
94 | .robarrier : ALIGN_WITH_INPUT { |
---|
95 | . = ALIGN (bsp_section_robarrier_align); |
---|
96 | } > REGION_RODATA AT > REGION_RODATA |
---|
97 | |
---|
98 | .rodata : ALIGN_WITH_INPUT { |
---|
99 | bsp_section_rodata_begin = .; |
---|
100 | *(.rodata .rodata.* .gnu.linkonce.r.*) |
---|
101 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
102 | .rodata1 : ALIGN_WITH_INPUT { |
---|
103 | *(.rodata1) |
---|
104 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
105 | .ARM.extab : ALIGN_WITH_INPUT { |
---|
106 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
---|
107 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
108 | .ARM.exidx : ALIGN_WITH_INPUT { |
---|
109 | __exidx_start = .; |
---|
110 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
---|
111 | __exidx_end = .; |
---|
112 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
113 | .eh_frame : ALIGN_WITH_INPUT { |
---|
114 | KEEP (*(.eh_frame)) |
---|
115 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
116 | .gcc_except_table : ALIGN_WITH_INPUT { |
---|
117 | *(.gcc_except_table .gcc_except_table.*) |
---|
118 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
119 | .tdata : ALIGN_WITH_INPUT { |
---|
120 | _TLS_Data_begin = .; |
---|
121 | *(.tdata .tdata.* .gnu.linkonce.td.*) |
---|
122 | _TLS_Data_end = .; |
---|
123 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
124 | .tbss : ALIGN_WITH_INPUT { |
---|
125 | _TLS_BSS_begin = .; |
---|
126 | *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) |
---|
127 | _TLS_BSS_end = .; |
---|
128 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
129 | _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin; |
---|
130 | _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin; |
---|
131 | _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin; |
---|
132 | _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin; |
---|
133 | _TLS_Size = _TLS_BSS_end - _TLS_Data_begin; |
---|
134 | _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss)); |
---|
135 | .preinit_array : ALIGN_WITH_INPUT { |
---|
136 | PROVIDE_HIDDEN (__preinit_array_start = .); |
---|
137 | KEEP (*(.preinit_array)) |
---|
138 | PROVIDE_HIDDEN (__preinit_array_end = .); |
---|
139 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
140 | .init_array : ALIGN_WITH_INPUT { |
---|
141 | PROVIDE_HIDDEN (__init_array_start = .); |
---|
142 | KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) |
---|
143 | KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) |
---|
144 | PROVIDE_HIDDEN (__init_array_end = .); |
---|
145 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
146 | .fini_array : ALIGN_WITH_INPUT { |
---|
147 | PROVIDE_HIDDEN (__fini_array_start = .); |
---|
148 | KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) |
---|
149 | KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) |
---|
150 | PROVIDE_HIDDEN (__fini_array_end = .); |
---|
151 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
152 | .data.rel.ro : ALIGN_WITH_INPUT { |
---|
153 | *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) |
---|
154 | *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) |
---|
155 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
156 | .jcr : ALIGN_WITH_INPUT { |
---|
157 | KEEP (*(.jcr)) |
---|
158 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
159 | .interp : ALIGN_WITH_INPUT { |
---|
160 | *(.interp) |
---|
161 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
162 | .note.gnu.build-id : ALIGN_WITH_INPUT { |
---|
163 | *(.note.gnu.build-id) |
---|
164 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
165 | .hash : ALIGN_WITH_INPUT { |
---|
166 | *(.hash) |
---|
167 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
168 | .gnu.hash : ALIGN_WITH_INPUT { |
---|
169 | *(.gnu.hash) |
---|
170 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
171 | .dynsym : ALIGN_WITH_INPUT { |
---|
172 | *(.dynsym) |
---|
173 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
174 | .dynstr : ALIGN_WITH_INPUT { |
---|
175 | *(.dynstr) |
---|
176 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
177 | .gnu.version : ALIGN_WITH_INPUT { |
---|
178 | *(.gnu.version) |
---|
179 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
180 | .gnu.version_d : ALIGN_WITH_INPUT { |
---|
181 | *(.gnu.version_d) |
---|
182 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
183 | .gnu.version_r : ALIGN_WITH_INPUT { |
---|
184 | *(.gnu.version_r) |
---|
185 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
186 | .rel.dyn : ALIGN_WITH_INPUT { |
---|
187 | *(.rel.init) |
---|
188 | *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) |
---|
189 | *(.rel.fini) |
---|
190 | *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) |
---|
191 | *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) |
---|
192 | *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) |
---|
193 | *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) |
---|
194 | *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) |
---|
195 | *(.rel.ctors) |
---|
196 | *(.rel.dtors) |
---|
197 | *(.rel.got) |
---|
198 | *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) |
---|
199 | PROVIDE_HIDDEN (__rel_iplt_start = .); |
---|
200 | *(.rel.iplt) |
---|
201 | PROVIDE_HIDDEN (__rel_iplt_end = .); |
---|
202 | PROVIDE_HIDDEN (__rela_iplt_start = .); |
---|
203 | PROVIDE_HIDDEN (__rela_iplt_end = .); |
---|
204 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
205 | .rela.dyn : ALIGN_WITH_INPUT { |
---|
206 | *(.rela.init) |
---|
207 | *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) |
---|
208 | *(.rela.fini) |
---|
209 | *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) |
---|
210 | *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) |
---|
211 | *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) |
---|
212 | *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) |
---|
213 | *(.rela.ctors) |
---|
214 | *(.rela.dtors) |
---|
215 | *(.rela.got) |
---|
216 | *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) |
---|
217 | *(.rela.rtemsroset*) |
---|
218 | *(.rela.rtemsrwset*) |
---|
219 | PROVIDE_HIDDEN (__rel_iplt_start = .); |
---|
220 | PROVIDE_HIDDEN (__rel_iplt_end = .); |
---|
221 | PROVIDE_HIDDEN (__rela_iplt_start = .); |
---|
222 | *(.rela.iplt) |
---|
223 | PROVIDE_HIDDEN (__rela_iplt_end = .); |
---|
224 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
225 | .rel.plt : ALIGN_WITH_INPUT { |
---|
226 | *(.rel.plt) |
---|
227 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
228 | .rela.plt : ALIGN_WITH_INPUT { |
---|
229 | *(.rela.plt) |
---|
230 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
231 | .plt : ALIGN_WITH_INPUT { |
---|
232 | *(.plt) |
---|
233 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
234 | .iplt : ALIGN_WITH_INPUT { |
---|
235 | *(.iplt) |
---|
236 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
237 | .dynamic : ALIGN_WITH_INPUT { |
---|
238 | *(.dynamic) |
---|
239 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
240 | .tm_clone_table : ALIGN_WITH_INPUT { |
---|
241 | *(.tm_clone_table) |
---|
242 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
243 | .got : ALIGN_WITH_INPUT { |
---|
244 | *(.got.plt) *(.igot.plt) *(.got) *(.igot) |
---|
245 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
246 | .rtemsroset : ALIGN_WITH_INPUT { |
---|
247 | /* Special FreeBSD linker set sections */ |
---|
248 | __start_set_sysctl_set = .; |
---|
249 | *(set_sysctl_*); |
---|
250 | __stop_set_sysctl_set = .; |
---|
251 | *(set_domain_*); |
---|
252 | *(set_pseudo_*); |
---|
253 | |
---|
254 | KEEP (*(SORT(.rtemsroset.*))) |
---|
255 | bsp_section_rodata_end = .; |
---|
256 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
257 | bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin; |
---|
258 | bsp_section_rodata_load_begin = LOADADDR (.rodata); |
---|
259 | bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size; |
---|
260 | |
---|
261 | .rwbarrier : ALIGN_WITH_INPUT { |
---|
262 | . = ALIGN (bsp_section_rwbarrier_align); |
---|
263 | } > REGION_DATA AT > REGION_DATA |
---|
264 | |
---|
265 | .vector : ALIGN_WITH_INPUT { |
---|
266 | bsp_section_vector_begin = .; |
---|
267 | . = . + DEFINED (bsp_vector_table_in_start_section) ? 0 : bsp_vector_table_size; |
---|
268 | bsp_section_vector_end = .; |
---|
269 | } > REGION_VECTOR AT > REGION_VECTOR |
---|
270 | bsp_section_vector_size = bsp_section_vector_end - bsp_section_vector_begin; |
---|
271 | bsp_vector_table_begin = DEFINED (bsp_vector_table_in_start_section) ? bsp_section_start_begin : bsp_section_vector_begin; |
---|
272 | bsp_vector_table_end = bsp_vector_table_begin + bsp_vector_table_size; |
---|
273 | |
---|
274 | .fast_text : ALIGN_WITH_INPUT { |
---|
275 | bsp_section_fast_text_begin = .; |
---|
276 | *(.bsp_fast_text) |
---|
277 | bsp_section_fast_text_end = .; |
---|
278 | } > REGION_FAST_TEXT AT > REGION_FAST_TEXT_LOAD |
---|
279 | bsp_section_fast_text_size = bsp_section_fast_text_end - bsp_section_fast_text_begin; |
---|
280 | bsp_section_fast_text_load_begin = LOADADDR (.fast_text); |
---|
281 | bsp_section_fast_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size; |
---|
282 | |
---|
283 | .fast_data : ALIGN_WITH_INPUT { |
---|
284 | bsp_section_fast_data_begin = .; |
---|
285 | *(.bsp_fast_data) |
---|
286 | bsp_section_fast_data_end = .; |
---|
287 | } > REGION_FAST_DATA AT > REGION_FAST_DATA_LOAD |
---|
288 | bsp_section_fast_data_size = bsp_section_fast_data_end - bsp_section_fast_data_begin; |
---|
289 | bsp_section_fast_data_load_begin = LOADADDR (.fast_data); |
---|
290 | bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size; |
---|
291 | |
---|
292 | .data : ALIGN_WITH_INPUT { |
---|
293 | bsp_section_data_begin = .; |
---|
294 | *(.data .data.* .gnu.linkonce.d.*) |
---|
295 | SORT(CONSTRUCTORS) |
---|
296 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
297 | .data1 : ALIGN_WITH_INPUT { |
---|
298 | *(.data1) |
---|
299 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
300 | .rtemsrwset : ALIGN_WITH_INPUT { |
---|
301 | KEEP (*(SORT(.rtemsrwset.*))) |
---|
302 | bsp_section_data_end = .; |
---|
303 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
304 | bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin; |
---|
305 | bsp_section_data_load_begin = LOADADDR (.data); |
---|
306 | bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size; |
---|
307 | |
---|
308 | .bss : ALIGN_WITH_INPUT { |
---|
309 | bsp_section_bss_begin = .; |
---|
310 | *(.dynbss) |
---|
311 | *(.bss .bss.* .gnu.linkonce.b.*) |
---|
312 | *(COMMON) |
---|
313 | bsp_section_bss_end = .; |
---|
314 | } > REGION_BSS AT > REGION_BSS |
---|
315 | bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin; |
---|
316 | |
---|
317 | .rtemsstack (NOLOAD) : ALIGN_WITH_INPUT { |
---|
318 | bsp_section_rtemsstack_begin = .; |
---|
319 | *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.rtemsstack*))) |
---|
320 | bsp_section_rtemsstack_end = .; |
---|
321 | } > REGION_WORK AT > REGION_WORK |
---|
322 | bsp_section_rtemsstack_size = bsp_section_rtemsstack_end - bsp_section_rtemsstack_begin; |
---|
323 | |
---|
324 | .noinit (NOLOAD) : ALIGN_WITH_INPUT { |
---|
325 | bsp_section_noinit_begin = .; |
---|
326 | *(SORT_BY_NAME (SORT_BY_ALIGNMENT (.noinit*))) |
---|
327 | bsp_section_noinit_end = .; |
---|
328 | } > REGION_WORK AT > REGION_WORK |
---|
329 | bsp_section_noinit_size = bsp_section_noinit_end - bsp_section_noinit_begin; |
---|
330 | |
---|
331 | .work : ALIGN_WITH_INPUT { |
---|
332 | /* |
---|
333 | * The work section will occupy the remaining REGION_WORK region and |
---|
334 | * contains the RTEMS work space and heap. |
---|
335 | */ |
---|
336 | bsp_section_work_begin = .; |
---|
337 | . += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.); |
---|
338 | bsp_section_work_end = .; |
---|
339 | } > REGION_WORK AT > REGION_WORK |
---|
340 | bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin; |
---|
341 | |
---|
342 | .stack : ALIGN_WITH_INPUT { |
---|
343 | /* |
---|
344 | * The stack section will occupy the remaining REGION_STACK region and may |
---|
345 | * contain the task stacks. Depending on the region distribution this |
---|
346 | * section may be of zero size. |
---|
347 | */ |
---|
348 | bsp_section_stack_begin = .; |
---|
349 | . += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.); |
---|
350 | bsp_section_stack_end = .; |
---|
351 | } > REGION_STACK AT > REGION_STACK |
---|
352 | bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin; |
---|
353 | |
---|
354 | .nocache : ALIGN_WITH_INPUT { |
---|
355 | bsp_section_nocache_begin = .; |
---|
356 | *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_nocache*))) |
---|
357 | bsp_section_nocache_end = .; |
---|
358 | } > REGION_NOCACHE AT > REGION_NOCACHE_LOAD |
---|
359 | bsp_section_nocache_size = bsp_section_nocache_end - bsp_section_nocache_begin; |
---|
360 | bsp_section_nocache_load_begin = LOADADDR (.nocache); |
---|
361 | bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size; |
---|
362 | |
---|
363 | .nocachenoload (NOLOAD) : ALIGN_WITH_INPUT { |
---|
364 | bsp_section_nocachenoload_begin = .; |
---|
365 | *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_noload_nocache*))) |
---|
366 | bsp_section_nocacheheap_begin = .; |
---|
367 | . += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.); |
---|
368 | bsp_section_nocacheheap_end = .; |
---|
369 | bsp_section_nocachenoload_end = .; |
---|
370 | } > REGION_NOCACHE AT > REGION_NOCACHE |
---|
371 | bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - bsp_section_nocacheheap_begin; |
---|
372 | bsp_section_nocachenoload_size = bsp_section_nocachenoload_end - bsp_section_nocachenoload_begin; |
---|
373 | |
---|
374 | /* FIXME */ |
---|
375 | RamBase = ORIGIN (REGION_WORK); |
---|
376 | RamSize = LENGTH (REGION_WORK); |
---|
377 | RamEnd = RamBase + RamSize; |
---|
378 | WorkAreaBase = bsp_section_work_begin; |
---|
379 | HeapSize = 0; |
---|
380 | |
---|
381 | /* Stabs debugging sections. */ |
---|
382 | .stab 0 : { *(.stab) } |
---|
383 | .stabstr 0 : { *(.stabstr) } |
---|
384 | .stab.excl 0 : { *(.stab.excl) } |
---|
385 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
386 | .stab.index 0 : { *(.stab.index) } |
---|
387 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
388 | .comment 0 : { *(.comment) } |
---|
389 | /* DWARF debug sections. |
---|
390 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
391 | of the section so we begin them at 0. */ |
---|
392 | /* DWARF 1. */ |
---|
393 | .debug 0 : { *(.debug) } |
---|
394 | .line 0 : { *(.line) } |
---|
395 | /* GNU DWARF 1 extensions. */ |
---|
396 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
397 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
398 | /* DWARF 1.1 and DWARF 2. */ |
---|
399 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
400 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
401 | /* DWARF 2. */ |
---|
402 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } |
---|
403 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
404 | .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end) } |
---|
405 | .debug_frame 0 : { *(.debug_frame) } |
---|
406 | .debug_str 0 : { *(.debug_str) } |
---|
407 | .debug_loc 0 : { *(.debug_loc) } |
---|
408 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
409 | /* SGI/MIPS DWARF 2 extensions. */ |
---|
410 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
411 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
412 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
413 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
414 | /* DWARF 3. */ |
---|
415 | .debug_pubtypes 0 : { *(.debug_pubtypes) } |
---|
416 | .debug_ranges 0 : { *(.debug_ranges) } |
---|
417 | /* DWARF 5. */ |
---|
418 | .debug_addr 0 : { *(.debug_addr) } |
---|
419 | .debug_line_str 0 : { *(.debug_line_str) } |
---|
420 | .debug_loclists 0 : { *(.debug_loclists) } |
---|
421 | .debug_macro 0 : { *(.debug_macro) } |
---|
422 | .debug_names 0 : { *(.debug_names) } |
---|
423 | .debug_rnglists 0 : { *(.debug_rnglists) } |
---|
424 | .debug_str_offsets 0 : { *(.debug_str_offsets) } |
---|
425 | .debug_sup 0 : { *(.debug_sup) } |
---|
426 | .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) } |
---|
427 | .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } |
---|
428 | /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } |
---|
429 | |
---|
430 | /* |
---|
431 | * This is a RTEMS specific section to catch all unexpected input |
---|
432 | * sections. In case you get an error like |
---|
433 | * "section `.unexpected_sections' will not fit in region |
---|
434 | * `UNEXPECTED_SECTIONS'" |
---|
435 | * you have to figure out the offending input section and add it to the |
---|
436 | * appropriate output section definition above. |
---|
437 | */ |
---|
438 | .unexpected_sections : { *(*) } > UNEXPECTED_SECTIONS |
---|
439 | } |
---|