[e635abf] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @ingroup bsp_linker |
---|
| 5 | * |
---|
| 6 | * @brief Linker command base file. |
---|
| 7 | */ |
---|
| 8 | |
---|
| 9 | /* |
---|
[ccda9459] | 10 | * Copyright (c) 2011, 2016 embedded brains GmbH. All rights reserved. |
---|
[e635abf] | 11 | * |
---|
| 12 | * embedded brains GmbH |
---|
[bc820946] | 13 | * Dornierstr. 4 |
---|
[e635abf] | 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 |
---|
[c499856] | 20 | * http://www.rtems.org/license/LICENSE. |
---|
[e635abf] | 21 | */ |
---|
| 22 | |
---|
| 23 | OUTPUT_FORMAT ("elf32-powerpc", "elf32-powerpc", "elf32-powerpc") |
---|
| 24 | |
---|
| 25 | OUTPUT_ARCH (powerpc:common) |
---|
| 26 | |
---|
| 27 | ENTRY (_start) |
---|
| 28 | |
---|
| 29 | /* |
---|
| 30 | * Global symbols that may be defined externally |
---|
| 31 | */ |
---|
| 32 | |
---|
| 33 | bsp_section_xbarrier_align = DEFINED (bsp_section_xbarrier_align) ? bsp_section_xbarrier_align : 1; |
---|
| 34 | bsp_section_robarrier_align = DEFINED (bsp_section_robarrier_align) ? bsp_section_robarrier_align : 1; |
---|
| 35 | bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1; |
---|
| 36 | |
---|
[fd153c73] | 37 | MEMORY { |
---|
| 38 | UNEXPECTED_SECTIONS : ORIGIN = 0xffffffff, LENGTH = 0 |
---|
| 39 | } |
---|
| 40 | |
---|
[e635abf] | 41 | SECTIONS { |
---|
[43c6268] | 42 | .start : ALIGN_WITH_INPUT { |
---|
[e635abf] | 43 | bsp_section_start_begin = .; |
---|
| 44 | KEEP (*(.bsp_start_text)) |
---|
| 45 | KEEP (*(.bsp_start_data)) |
---|
| 46 | bsp_section_start_end = .; |
---|
| 47 | } > REGION_START AT > REGION_START |
---|
| 48 | bsp_section_start_size = bsp_section_start_end - bsp_section_start_begin; |
---|
| 49 | |
---|
[43c6268] | 50 | .xbarrier : ALIGN_WITH_INPUT { |
---|
[e635abf] | 51 | . = ALIGN (bsp_section_xbarrier_align); |
---|
[bba0e09] | 52 | } > REGION_TEXT AT > REGION_TEXT |
---|
[e635abf] | 53 | |
---|
[43c6268] | 54 | .text : ALIGN_WITH_INPUT { |
---|
[e635abf] | 55 | bsp_section_text_begin = .; |
---|
[c383372] | 56 | *(SORT(.bsp_text*)) |
---|
[e635abf] | 57 | *(.text.unlikely .text.*_unlikely) |
---|
| 58 | *(.text .stub .text.* .gnu.linkonce.t.*) |
---|
| 59 | *(.gnu.warning) |
---|
| 60 | *(.glink) |
---|
[43c6268] | 61 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
| 62 | .init : ALIGN_WITH_INPUT { |
---|
[e635abf] | 63 | KEEP (*(.init)) |
---|
[43c6268] | 64 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
| 65 | .fini : ALIGN_WITH_INPUT { |
---|
[e635abf] | 66 | PROVIDE (_fini = .); |
---|
| 67 | KEEP (*(.fini)) |
---|
| 68 | bsp_section_text_end = .; |
---|
| 69 | } > REGION_TEXT AT > REGION_TEXT_LOAD |
---|
| 70 | bsp_section_text_size = bsp_section_text_end - bsp_section_text_begin; |
---|
| 71 | bsp_section_text_load_begin = LOADADDR (.text); |
---|
| 72 | bsp_section_text_load_end = bsp_section_text_load_begin + bsp_section_text_size; |
---|
| 73 | |
---|
[43c6268] | 74 | .fast_text : ALIGN_WITH_INPUT { |
---|
[d33f743] | 75 | bsp_section_fast_text_begin = .; |
---|
| 76 | *(.bsp_fast_text) |
---|
| 77 | bsp_section_fast_text_end = .; |
---|
| 78 | } > REGION_FAST_TEXT AT > REGION_FAST_TEXT_LOAD |
---|
| 79 | bsp_section_fast_text_size = bsp_section_fast_text_end - bsp_section_fast_text_begin; |
---|
| 80 | bsp_section_fast_text_load_begin = LOADADDR (.fast_text); |
---|
| 81 | bsp_section_fast_text_load_end = bsp_section_fast_text_load_begin + bsp_section_fast_text_size; |
---|
| 82 | |
---|
[43c6268] | 83 | .robarrier : ALIGN_WITH_INPUT { |
---|
[e635abf] | 84 | . = ALIGN (bsp_section_robarrier_align); |
---|
[bba0e09] | 85 | } > REGION_RODATA AT > REGION_RODATA |
---|
[e635abf] | 86 | |
---|
[43c6268] | 87 | .rodata : ALIGN_WITH_INPUT { |
---|
[e635abf] | 88 | bsp_section_rodata_begin = .; |
---|
[574ab8a] | 89 | *(SORT(.bsp_rodata*)) |
---|
[e635abf] | 90 | *(.rodata .rodata.* .gnu.linkonce.r.*) |
---|
[43c6268] | 91 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 92 | .rodata1 : ALIGN_WITH_INPUT { |
---|
[e635abf] | 93 | *(.rodata1) |
---|
[43c6268] | 94 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 95 | .sdata2 : ALIGN_WITH_INPUT { |
---|
| 96 | PROVIDE (_SDA2_BASE_ = 32768); |
---|
| 97 | *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) |
---|
| 98 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 99 | .sbss2 : ALIGN_WITH_INPUT { |
---|
| 100 | *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) |
---|
| 101 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 102 | .eh_frame_hdr : ALIGN_WITH_INPUT { |
---|
[e635abf] | 103 | *(.eh_frame_hdr) |
---|
[43c6268] | 104 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 105 | .eh_frame : ALIGN_WITH_INPUT { |
---|
[e635abf] | 106 | KEEP (*(.eh_frame)) |
---|
[43c6268] | 107 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 108 | .gcc_except_table : ALIGN_WITH_INPUT { |
---|
[e635abf] | 109 | *(.gcc_except_table .gcc_except_table.*) |
---|
[43c6268] | 110 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 111 | .tdata : ALIGN_WITH_INPUT { |
---|
[960fd85] | 112 | _TLS_Data_begin = .; |
---|
[e635abf] | 113 | *(.tdata .tdata.* .gnu.linkonce.td.*) |
---|
[960fd85] | 114 | _TLS_Data_end = .; |
---|
[43c6268] | 115 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 116 | .tbss : ALIGN_WITH_INPUT { |
---|
[960fd85] | 117 | _TLS_BSS_begin = .; |
---|
[e635abf] | 118 | *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) |
---|
[960fd85] | 119 | _TLS_BSS_end = .; |
---|
[43c6268] | 120 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
[960fd85] | 121 | _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin; |
---|
[d60e760] | 122 | _TLS_Data_begin = _TLS_Data_size != 0 ? _TLS_Data_begin : _TLS_BSS_begin; |
---|
| 123 | _TLS_Data_end = _TLS_Data_size != 0 ? _TLS_Data_end : _TLS_BSS_begin; |
---|
[960fd85] | 124 | _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin; |
---|
| 125 | _TLS_Size = _TLS_BSS_end - _TLS_Data_begin; |
---|
[d60e760] | 126 | _TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss)); |
---|
[43c6268] | 127 | .preinit_array : ALIGN_WITH_INPUT { |
---|
[e635abf] | 128 | PROVIDE_HIDDEN (__preinit_array_start = .); |
---|
| 129 | KEEP (*(.preinit_array)) |
---|
| 130 | PROVIDE_HIDDEN (__preinit_array_end = .); |
---|
[43c6268] | 131 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 132 | .init_array : ALIGN_WITH_INPUT { |
---|
[e635abf] | 133 | PROVIDE_HIDDEN (__init_array_start = .); |
---|
| 134 | KEEP (*(SORT(.init_array.*))) |
---|
| 135 | KEEP (*(.init_array)) |
---|
| 136 | PROVIDE_HIDDEN (__init_array_end = .); |
---|
[43c6268] | 137 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 138 | .fini_array : ALIGN_WITH_INPUT { |
---|
[e635abf] | 139 | PROVIDE_HIDDEN (__fini_array_start = .); |
---|
| 140 | KEEP (*(SORT(.fini_array.*))) |
---|
| 141 | KEEP (*(.fini_array)) |
---|
| 142 | PROVIDE_HIDDEN (__fini_array_end = .); |
---|
[43c6268] | 143 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 144 | .ctors : ALIGN_WITH_INPUT { |
---|
[e635abf] | 145 | KEEP (*crtbegin.o(.ctors)) |
---|
| 146 | KEEP (*crtbegin?.o(.ctors)) |
---|
| 147 | KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) |
---|
| 148 | KEEP (*(SORT(.ctors.*))) |
---|
| 149 | KEEP (*(.ctors)) |
---|
[43c6268] | 150 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 151 | .dtors : ALIGN_WITH_INPUT { |
---|
[e635abf] | 152 | KEEP (*crtbegin.o(.dtors)) |
---|
| 153 | KEEP (*crtbegin?.o(.dtors)) |
---|
| 154 | KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) |
---|
| 155 | KEEP (*(SORT(.dtors.*))) |
---|
| 156 | KEEP (*(.dtors)) |
---|
[43c6268] | 157 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 158 | .jcr : ALIGN_WITH_INPUT { |
---|
[e635abf] | 159 | KEEP (*(.jcr)) |
---|
[43c6268] | 160 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 161 | .data.rel.ro : ALIGN_WITH_INPUT { |
---|
[e635abf] | 162 | *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) |
---|
[43c6268] | 163 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 164 | .fixup : ALIGN_WITH_INPUT { |
---|
[e635abf] | 165 | *(.fixup) |
---|
[43c6268] | 166 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 167 | .dynamic : ALIGN_WITH_INPUT { |
---|
[e635abf] | 168 | *(.dynamic) |
---|
[43c6268] | 169 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 170 | .got1 : ALIGN_WITH_INPUT { |
---|
[e635abf] | 171 | *(.got1) |
---|
[43c6268] | 172 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 173 | .got2 : ALIGN_WITH_INPUT { |
---|
[e635abf] | 174 | *(.got2) |
---|
[43c6268] | 175 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 176 | .got : ALIGN_WITH_INPUT { |
---|
[e635abf] | 177 | *(.got) |
---|
[43c6268] | 178 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 179 | .plt : ALIGN_WITH_INPUT { |
---|
[e635abf] | 180 | *(.plt) |
---|
[43c6268] | 181 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 182 | .iplt : ALIGN_WITH_INPUT { |
---|
[e635abf] | 183 | *(.iplt) |
---|
[43c6268] | 184 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 185 | .interp : ALIGN_WITH_INPUT { |
---|
[e635abf] | 186 | *(.interp) |
---|
[43c6268] | 187 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 188 | .note.gnu.build-id : ALIGN_WITH_INPUT { |
---|
[e635abf] | 189 | *(.note.gnu.build-id) |
---|
[43c6268] | 190 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 191 | .hash : ALIGN_WITH_INPUT { |
---|
[e635abf] | 192 | *(.hash) |
---|
[43c6268] | 193 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 194 | .gnu.hash : ALIGN_WITH_INPUT { |
---|
[e635abf] | 195 | *(.gnu.hash) |
---|
[43c6268] | 196 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 197 | .dynsym : ALIGN_WITH_INPUT { |
---|
[e635abf] | 198 | *(.dynsym) |
---|
[43c6268] | 199 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 200 | .dynstr : ALIGN_WITH_INPUT { |
---|
[e635abf] | 201 | *(.dynstr) |
---|
[43c6268] | 202 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 203 | .gnu.version : ALIGN_WITH_INPUT { |
---|
[e635abf] | 204 | *(.gnu.version) |
---|
[43c6268] | 205 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 206 | .gnu.version_d : ALIGN_WITH_INPUT { |
---|
[e635abf] | 207 | *(.gnu.version_d) |
---|
[43c6268] | 208 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 209 | .gnu.version_r : ALIGN_WITH_INPUT { |
---|
[e635abf] | 210 | *(.gnu.version_r) |
---|
[43c6268] | 211 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 212 | .rela.dyn : ALIGN_WITH_INPUT { |
---|
[e635abf] | 213 | *(.rela.init) |
---|
| 214 | *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) |
---|
| 215 | *(.rela.fini) |
---|
| 216 | *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) |
---|
| 217 | *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) |
---|
| 218 | *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) |
---|
| 219 | *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) |
---|
| 220 | *(.rela.ctors) |
---|
| 221 | *(.rela.dtors) |
---|
| 222 | *(.rela.got) |
---|
| 223 | *(.rela.got1) |
---|
| 224 | *(.rela.got2) |
---|
| 225 | *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) |
---|
| 226 | *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) |
---|
| 227 | *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) |
---|
| 228 | *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) |
---|
| 229 | *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) |
---|
[1fcdd639] | 230 | *(.rela.rtemsroset*) |
---|
| 231 | *(.rela.rtemsrwset*) |
---|
[e635abf] | 232 | PROVIDE_HIDDEN (__rel_iplt_start = .); |
---|
| 233 | PROVIDE_HIDDEN (__rel_iplt_end = .); |
---|
| 234 | PROVIDE_HIDDEN (__rela_iplt_start = .); |
---|
| 235 | *(.rela.iplt) |
---|
| 236 | PROVIDE_HIDDEN (__rela_iplt_end = .); |
---|
[43c6268] | 237 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 238 | .rela.plt : ALIGN_WITH_INPUT { |
---|
[e635abf] | 239 | *(.rela.plt) |
---|
[43c6268] | 240 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
[e4927ece] | 241 | .rtemsroset : ALIGN_WITH_INPUT { |
---|
[e635abf] | 242 | /* Special FreeBSD linker set sections */ |
---|
| 243 | __start_set_sysctl_set = .; |
---|
| 244 | *(set_sysctl_*); |
---|
| 245 | __stop_set_sysctl_set = .; |
---|
| 246 | *(set_domain_*); |
---|
| 247 | *(set_pseudo_*); |
---|
| 248 | |
---|
[e4927ece] | 249 | KEEP (*(SORT(.rtemsroset.*))) |
---|
[e635abf] | 250 | bsp_section_rodata_end = .; |
---|
| 251 | } > REGION_RODATA AT > REGION_RODATA_LOAD |
---|
| 252 | bsp_section_rodata_size = bsp_section_rodata_end - bsp_section_rodata_begin; |
---|
| 253 | bsp_section_rodata_load_begin = LOADADDR (.rodata); |
---|
| 254 | bsp_section_rodata_load_end = bsp_section_rodata_load_begin + bsp_section_rodata_size; |
---|
| 255 | |
---|
[43c6268] | 256 | .rwbarrier : ALIGN_WITH_INPUT { |
---|
[e635abf] | 257 | . = ALIGN (bsp_section_rwbarrier_align); |
---|
[bba0e09] | 258 | } > REGION_DATA AT > REGION_DATA |
---|
[e635abf] | 259 | |
---|
[43c6268] | 260 | .fast_data : ALIGN_WITH_INPUT { |
---|
[e635abf] | 261 | bsp_section_fast_data_begin = .; |
---|
[574ab8a] | 262 | *(SORT(.bsp_fast_data*)) |
---|
[e635abf] | 263 | bsp_section_fast_data_end = .; |
---|
| 264 | } > REGION_FAST_DATA AT > REGION_FAST_DATA_LOAD |
---|
| 265 | bsp_section_fast_data_size = bsp_section_fast_data_end - bsp_section_fast_data_begin; |
---|
| 266 | bsp_section_fast_data_load_begin = LOADADDR (.fast_data); |
---|
| 267 | bsp_section_fast_data_load_end = bsp_section_fast_data_load_begin + bsp_section_fast_data_size; |
---|
| 268 | |
---|
[43c6268] | 269 | .data : ALIGN_WITH_INPUT { |
---|
[e635abf] | 270 | bsp_section_data_begin = .; |
---|
[574ab8a] | 271 | *(SORT(.bsp_data*)) |
---|
[e635abf] | 272 | *(.data .data.* .gnu.linkonce.d.*) |
---|
| 273 | SORT(CONSTRUCTORS) |
---|
[43c6268] | 274 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
| 275 | .data1 : ALIGN_WITH_INPUT { |
---|
[e635abf] | 276 | *(.data1) |
---|
[43c6268] | 277 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
[e4927ece] | 278 | .rtemsrwset : ALIGN_WITH_INPUT { |
---|
| 279 | KEEP (*(SORT(.rtemsrwset.*))) |
---|
[43c6268] | 280 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
| 281 | .sdata : ALIGN_WITH_INPUT { |
---|
| 282 | PROVIDE (_SDA_BASE_ = 32768); |
---|
| 283 | *(.sdata .sdata.* .gnu.linkonce.s.*) |
---|
[e635abf] | 284 | bsp_section_data_end = .; |
---|
| 285 | } > REGION_DATA AT > REGION_DATA_LOAD |
---|
| 286 | bsp_section_data_size = bsp_section_data_end - bsp_section_data_begin; |
---|
| 287 | bsp_section_data_load_begin = LOADADDR (.data); |
---|
| 288 | bsp_section_data_load_end = bsp_section_data_load_begin + bsp_section_data_size; |
---|
| 289 | |
---|
[43c6268] | 290 | .sbss : ALIGN_WITH_INPUT { |
---|
[e635abf] | 291 | bsp_section_sbss_begin = .; |
---|
| 292 | *(.dynsbss) |
---|
| 293 | *(.sbss .sbss.* .gnu.linkonce.sb.*) |
---|
| 294 | *(.scommon) |
---|
| 295 | bsp_section_sbss_end = .; |
---|
| 296 | } > REGION_DATA AT > REGION_DATA |
---|
| 297 | bsp_section_sbss_size = bsp_section_sbss_end - bsp_section_sbss_begin; |
---|
| 298 | |
---|
[43c6268] | 299 | .bss : ALIGN_WITH_INPUT { |
---|
[e635abf] | 300 | bsp_section_bss_begin = .; |
---|
| 301 | *(.dynbss) |
---|
| 302 | *(.bss .bss.* .gnu.linkonce.b.*) |
---|
| 303 | *(COMMON) |
---|
| 304 | bsp_section_bss_end = .; |
---|
| 305 | } > REGION_BSS AT > REGION_BSS |
---|
| 306 | bsp_section_bss_size = bsp_section_bss_end - bsp_section_bss_begin; |
---|
| 307 | |
---|
[43c6268] | 308 | .rwextra : ALIGN_WITH_INPUT { |
---|
[e635abf] | 309 | bsp_section_rwextra_begin = .; |
---|
| 310 | *(.bsp_rwextra) |
---|
| 311 | bsp_section_rwextra_end = .; |
---|
| 312 | } > REGION_RWEXTRA AT > REGION_RWEXTRA |
---|
| 313 | bsp_section_rwextra_size = bsp_section_rwextra_end - bsp_section_rwextra_begin; |
---|
| 314 | |
---|
[43c6268] | 315 | .work : ALIGN_WITH_INPUT { |
---|
[e635abf] | 316 | /* |
---|
| 317 | * The work section will occupy the remaining REGION_WORK region and |
---|
| 318 | * contains the RTEMS work space and heap. |
---|
| 319 | */ |
---|
| 320 | bsp_section_work_begin = .; |
---|
| 321 | . += ORIGIN (REGION_WORK) + LENGTH (REGION_WORK) - ABSOLUTE (.); |
---|
| 322 | bsp_section_work_end = .; |
---|
| 323 | } > REGION_WORK AT > REGION_WORK |
---|
| 324 | bsp_section_work_size = bsp_section_work_end - bsp_section_work_begin; |
---|
| 325 | |
---|
[43c6268] | 326 | .stack : ALIGN_WITH_INPUT { |
---|
[e635abf] | 327 | /* |
---|
| 328 | * The stack section will occupy the remaining REGION_STACK region and may |
---|
| 329 | * contain the task stacks. Depending on the region distribution this |
---|
| 330 | * section may be of zero size. |
---|
| 331 | */ |
---|
| 332 | bsp_section_stack_begin = .; |
---|
| 333 | . += ORIGIN (REGION_STACK) + LENGTH (REGION_STACK) - ABSOLUTE (.); |
---|
| 334 | bsp_section_stack_end = .; |
---|
| 335 | } > REGION_STACK AT > REGION_STACK |
---|
| 336 | bsp_section_stack_size = bsp_section_stack_end - bsp_section_stack_begin; |
---|
| 337 | |
---|
[43c6268] | 338 | .nocache : ALIGN_WITH_INPUT { |
---|
[d1018534] | 339 | bsp_section_nocache_begin = .; |
---|
[ccda9459] | 340 | *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_nocache*))) |
---|
[d1018534] | 341 | bsp_section_nocache_end = .; |
---|
[6273201] | 342 | } > REGION_NOCACHE AT > REGION_NOCACHE_LOAD |
---|
[d1018534] | 343 | bsp_section_nocache_size = bsp_section_nocache_end - bsp_section_nocache_begin; |
---|
[6273201] | 344 | bsp_section_nocache_load_begin = LOADADDR (.nocache); |
---|
| 345 | bsp_section_nocache_load_end = bsp_section_nocache_load_begin + bsp_section_nocache_size; |
---|
[d1018534] | 346 | |
---|
[53c99b8] | 347 | .nocachenoload (NOLOAD) : ALIGN_WITH_INPUT { |
---|
| 348 | bsp_section_nocachenoload_begin = .; |
---|
[ccda9459] | 349 | *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_noload_nocache*))) |
---|
[bc820946] | 350 | bsp_section_nocacheheap_begin = .; |
---|
| 351 | . += ORIGIN (REGION_NOCACHE) + LENGTH (REGION_NOCACHE) - ABSOLUTE (.); |
---|
| 352 | bsp_section_nocacheheap_end = .; |
---|
[53c99b8] | 353 | bsp_section_nocachenoload_end = .; |
---|
[bc820946] | 354 | } > REGION_NOCACHE AT > REGION_NOCACHE |
---|
| 355 | bsp_section_nocacheheap_size = bsp_section_nocacheheap_end - bsp_section_nocacheheap_begin; |
---|
[53c99b8] | 356 | bsp_section_nocachenoload_size = bsp_section_nocachenoload_end - bsp_section_nocachenoload_begin; |
---|
[bc820946] | 357 | |
---|
[43c6268] | 358 | .nvram (NOLOAD) : ALIGN_WITH_INPUT { |
---|
[113768f] | 359 | bsp_section_nvram_begin = .; |
---|
[ccda9459] | 360 | *(SORT_BY_ALIGNMENT (SORT_BY_NAME (.bsp_nvram*))) |
---|
[113768f] | 361 | bsp_section_nvram_end = .; |
---|
[bc820946] | 362 | } > REGION_NVRAM AT > REGION_NVRAM |
---|
[113768f] | 363 | bsp_section_nvram_size = bsp_section_nvram_end - bsp_section_nvram_begin; |
---|
| 364 | |
---|
[e635abf] | 365 | /* FIXME */ |
---|
| 366 | RamBase = ORIGIN (REGION_WORK); |
---|
| 367 | RamSize = LENGTH (REGION_WORK); |
---|
| 368 | WorkAreaBase = bsp_section_work_begin; |
---|
| 369 | HeapSize = 0; |
---|
| 370 | |
---|
| 371 | /* Stabs debugging sections. */ |
---|
| 372 | .stab 0 : { *(.stab) } |
---|
| 373 | .stabstr 0 : { *(.stabstr) } |
---|
| 374 | .stab.excl 0 : { *(.stab.excl) } |
---|
| 375 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
| 376 | .stab.index 0 : { *(.stab.index) } |
---|
| 377 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
| 378 | .comment 0 : { *(.comment) } |
---|
| 379 | /* DWARF debug sections. |
---|
| 380 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
| 381 | of the section so we begin them at 0. */ |
---|
| 382 | /* DWARF 1 */ |
---|
| 383 | .debug 0 : { *(.debug) } |
---|
| 384 | .line 0 : { *(.line) } |
---|
| 385 | /* GNU DWARF 1 extensions */ |
---|
[4800ffe] | 386 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
| 387 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
[e635abf] | 388 | /* DWARF 1.1 and DWARF 2 */ |
---|
[4800ffe] | 389 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
| 390 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
[e635abf] | 391 | /* DWARF 2 */ |
---|
[4800ffe] | 392 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } |
---|
| 393 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
| 394 | .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } |
---|
| 395 | .debug_frame 0 : { *(.debug_frame) } |
---|
| 396 | .debug_str 0 : { *(.debug_str) } |
---|
| 397 | .debug_loc 0 : { *(.debug_loc) } |
---|
| 398 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
[e635abf] | 399 | /* SGI/MIPS DWARF 2 extensions */ |
---|
[4800ffe] | 400 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
| 401 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
| 402 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
| 403 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
[e635abf] | 404 | /* DWARF 3 */ |
---|
[4800ffe] | 405 | .debug_pubtypes 0 : { *(.debug_pubtypes) } |
---|
| 406 | .debug_ranges 0 : { *(.debug_ranges) } |
---|
| 407 | /* DWARF Extension. */ |
---|
[df6818f9] | 408 | .debug_macro 0 : { *(.debug_macro) } |
---|
[e635abf] | 409 | .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } |
---|
| 410 | .PPC.EMB.apuinfo 0 : { *(.PPC.EMB.apuinfo) } |
---|
| 411 | /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } |
---|
| 412 | |
---|
[fd153c73] | 413 | /* |
---|
| 414 | * This is a RTEMS specific section to catch all unexpected input |
---|
| 415 | * sections. In case you get an error like |
---|
| 416 | * "section `.unexpected_sections' will not fit in region |
---|
| 417 | * `UNEXPECTED_SECTIONS'" |
---|
| 418 | * you have to figure out the offending input section and add it to the |
---|
| 419 | * appropriate output section definition above. |
---|
| 420 | */ |
---|
| 421 | .unexpected_sections : { *(*) } > UNEXPECTED_SECTIONS |
---|
[e635abf] | 422 | } |
---|