Fix a bunch of boot.lds files so that they build with newer ld. The stack/bss section...
[kugel-rb.git] / firmware / target / arm / ipod / boot.lds
blob04843d0031c2acd65afcbe959e5821de3ac9826b
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 #if CONFIG_CPU == PP5020
11 #define DRAMORIG 0x10000000
12 #define IRAMORIG 0x40000000
13 #define IRAMSIZE 0x18000
14 #define FLASHORIG 0x001f0000
15 #define FLASHSIZE 2M
16 #elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
17 #define DRAMORIG 0x10000000
18 #ifndef IRAMORIG
19 #define IRAMORIG 0x40000000
20 #endif
21 #define IRAMSIZE 0x20000
22 #define FLASHORIG 0x001f0000
23 #define FLASHSIZE 2M
24 #elif CONFIG_CPU == PP5002
25 #define DRAMORIG 0x28000000
26 #define IRAMORIG 0x40000000
27 #define IRAMSIZE 0x18000
28 #define FLASHORIG 0x001f0000
29 #define FLASHSIZE 2M
30 #endif
32 MEMORY
34     DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
35     IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
38 SECTIONS
40   . = IRAMORIG;
42   .text : {
43     *(.init.text)
44     *(.text*)
45     *(.glue_7)
46     *(.glue_7t)
47   } > IRAM
49   .data : {
50     *(.icode)
51     *(.irodata)
52     *(.idata)
53     *(.data*)
54     *(.ncdata*)
55     *(.rodata*)
56     _dataend = . ;
57   } > IRAM
59   .stack (NOLOAD) : {
60      *(.stack)
61      _stackbegin = .;
62      stackbegin = .;
63      . += 0x2000;
64      _stackend = .;
65      stackend = .;
66   } > IRAM
68   /* The bss section is too large for IRAM - we just move it 16MB into the
69      DRAM */
71   . = DRAMORIG;
72   .bss . + (16*1024*1024) (NOLOAD) : {
73      _edata = .;
74      *(.bss*);
75      *(.ibss);
76      *(COMMON)
77      *(.ncbss*);
78      _end = .;
79   } > DRAM