Fix a bunch of boot.lds files so that they build with newer ld. The stack/bss section...
[kugel-rb.git] / firmware / target / arm / philips / boot.lds
blob0736bec96a1f90577d61f09fc3a25eb2269d8f69
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 #define DRAMORIG 0x10000000
11 #ifndef IRAMORIG
12 #define IRAMORIG 0x40000000
13 #endif
14 #define IRAMSIZE 0x20000
15 #define FLASHORIG 0x001f0000
16 #define FLASHSIZE 2M
18 MEMORY
20     DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
21     IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
24 SECTIONS
26   . = IRAMORIG;
28   .text : {
29     *(.init.text)
30     *(.text*)
31     *(.glue_7)
32     *(.glue_7t)
33   } > IRAM
35   .data : {
36     *(.icode)
37     *(.irodata)
38     *(.idata)
39     *(.data*)
40     *(.ncdata*)
41     *(.rodata*)
42     _dataend = . ;
43   } > IRAM
45   .stack (NOLOAD) : {
46      *(.stack)
47      _stackbegin = .;
48      stackbegin = .;
49      . += 0x2000;
50      _stackend = .;
51      stackend = .;
52   } > IRAM
54   /* The bss section is too large for IRAM - we just move it 16MB into the
55      DRAM */
57   . = DRAMORIG;
58   .bss . + (16*1024*1024) (NOLOAD) : {
59      _edata = .;
60      *(.bss*);
61      *(.ibss);
62      *(COMMON)
63      *(.ncbss*);
64      _end = .;
65   } > DRAM