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