Fix a bunch of boot.lds files so that they build with newer ld. The stack/bss section...
[kugel-rb.git] / firmware / target / arm / sandisk / boot.lds
blobc0621b8abf78f30fbfd9f64da912e21f613fb5cd
1 #include "config.h"
3 ENTRY(start)
4 OUTPUT_FORMAT(elf32-littlearm)
5 OUTPUT_ARCH(arm)
6 STARTUP(target/arm/crt0-pp-bl.o)
8 #define DRAMSIZE (MEMORYSIZE * 0x100000)
10 #ifdef SANSA_VIEW
11 #define DRAMORIG 0x10f00000
12 #else
13 #define DRAMORIG 0x10000000
14 #endif
16 #ifndef IRAMORIG
17 #define IRAMORIG 0x40000000
18 #endif
19 #define IRAMSIZE 0x20000
20 #define FLASHORIG 0x001f0000
21 #define FLASHSIZE 2M
23 MEMORY
25     DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
26     IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
29 SECTIONS
31 #ifdef C200_ERASE
32   . = IRAMORIG+0x4000;
33 #else
34   . = IRAMORIG;
35 #endif
37   .text : {
38     *(.init.text)
39     *(.text*)
40     *(.glue_7)
41     *(.glue_7t)
42   } > IRAM
44   .data : {
45     *(.icode)
46     *(.irodata)
47     *(.idata)
48     *(.data*)
49     *(.ncdata*)
50     *(.rodata*)
51     _dataend = . ;
52   } > IRAM
54   .stack (NOLOAD) : {
55      *(.stack)
56      _stackbegin = .;
57      stackbegin = .;
58      . += 0x2000;
59      _stackend = .;
60      stackend = .;
61   } > IRAM
63   /* The bss section is too large for IRAM - we just move it 16MB into the
64      DRAM */
66   . = DRAMORIG;
67   .bss . + (16*1024*1024) (NOLOAD) : {
68      _edata = .;
69      *(.bss*);
70      *(.ibss);
71      *(COMMON)
72      *(.ncbss*);
73      _end = .;
74   } > DRAM