import cbaos v0.1
[cbaos.git] / arch / arm-cortex-m0 / ld / sections.ld
blob332cb700a1d5f3a7e87579fd813333fffea41496
1 ENTRY(_vectors)
3 /* http://sourceware.org/binutils/docs/ld/Output-Section-LMA.html */
5 _ram_start = ORIGIN(RAM);
6 _ram_end = ORIGIN(RAM) + LENGTH(RAM);
8 SECTIONS
10         .text :
11         {
12                 KEEP(*(.vectors))
14                 /* because this is only accessible after remapping from boot loader */
15                 /* TODO hmm? still true? can .rodata be before this? where is it remapped? */
16                 . = . < 0x200 ? 0x200 : . ;
18                 *(.text)
19                 *(.rodata)
20                 *(.rodata.*)
21         } >FLASH
23         /* does this guarantee nothing will come between? */
24         . = ALIGN(4);
25         _fldata = . ;
26         .data : ALIGN(4)
27         {
28                 _data = . ;
29                 *(.data)
30                 . = ALIGN(4);
31                 _edata = . ;
32         } >RAM AT>FLASH
34         .bss : ALIGN(4)
35         {
36                 _bss = . ;
37                 *(.bss)
38                 *(COMMON)
39                 . = ALIGN(4);
40                 _ebss = ALIGN(4);
41         } >RAM
43 /*      blah :
44         {
45                 *(.init*)
46                 *(.fini*)
47                 *(.eh_frame)
48                 *(.jcr)
49                 *(.bss)
50         } >RAM*/
52         _end = ALIGN(4);