diff options
Diffstat (limited to 'firmware/target/arm/imx31/boot.lds')
-rw-r--r-- | firmware/target/arm/imx31/boot.lds | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/firmware/target/arm/imx31/boot.lds b/firmware/target/arm/imx31/boot.lds new file mode 100644 index 0000000000..84597d5ad1 --- /dev/null +++ b/firmware/target/arm/imx31/boot.lds | |||
@@ -0,0 +1,84 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | OUTPUT_FORMAT(elf32-littlearm) | ||
5 | OUTPUT_ARCH(arm) | ||
6 | INPUT(target/arm/imx31/crt0.o) | ||
7 | |||
8 | #define DRAMSIZE (1 << 20) /* Limit 1 MB for bootloader */ | ||
9 | |||
10 | #define DRAMORIG (0x02000000-0x00100000) | ||
11 | #define IRAM DRAM | ||
12 | #define IRAMORIG 0x1FFFC000 | ||
13 | #define IRAMSIZE 16K | ||
14 | #define FLASHORIG 0x0000000 | ||
15 | #define FLASHSIZE 1M | ||
16 | |||
17 | MEMORY | ||
18 | { | ||
19 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
20 | } | ||
21 | |||
22 | SECTIONS | ||
23 | { | ||
24 | . = DRAMORIG; | ||
25 | |||
26 | .text : | ||
27 | { | ||
28 | *(.init.text) | ||
29 | *(.text*) | ||
30 | *(.icode) | ||
31 | *(.glue_7) | ||
32 | *(.glue_7t) | ||
33 | . = ALIGN(0x4); | ||
34 | } > DRAM | ||
35 | |||
36 | .rodata : | ||
37 | { | ||
38 | *(.rodata) /* problems without this, dunno why */ | ||
39 | *(.rodata*) | ||
40 | *(.rodata.str1.1) | ||
41 | *(.rodata.str1.4) | ||
42 | . = ALIGN(0x4); | ||
43 | |||
44 | /* Pseudo-allocate the copies of the data sections */ | ||
45 | _datacopy = .; | ||
46 | } > DRAM | ||
47 | |||
48 | .data : | ||
49 | { | ||
50 | *(.irodata) | ||
51 | *(.idata) | ||
52 | *(.data*) | ||
53 | . = ALIGN(0x4); | ||
54 | _dataend = . ; | ||
55 | } > DRAM | ||
56 | |||
57 | .stack : | ||
58 | { | ||
59 | *(.stack) | ||
60 | _stackbegin = .; | ||
61 | stackbegin = .; | ||
62 | . += 0x2000; | ||
63 | _stackend = .; | ||
64 | stackend = .; | ||
65 | } > IRAM | ||
66 | |||
67 | .bss : | ||
68 | { | ||
69 | _edata = .; | ||
70 | *(.bss*); | ||
71 | *(.ibss); | ||
72 | *(COMMON) | ||
73 | _end = .; | ||
74 | } > DRAM | ||
75 | |||
76 | .vectors 0x0 : | ||
77 | { | ||
78 | _vectorsstart = .; | ||
79 | *(.vectors); | ||
80 | KEEP(*(.vectors)); | ||
81 | _vectorsend = .; | ||
82 | } AT > DRAM | ||
83 | _vectorscopy = LOADADDR(.vectors); | ||
84 | } | ||