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