diff options
Diffstat (limited to 'firmware/target/sh/archos/boot.lds')
-rw-r--r-- | firmware/target/sh/archos/boot.lds | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/firmware/target/sh/archos/boot.lds b/firmware/target/sh/archos/boot.lds new file mode 100644 index 0000000000..8002f6e87f --- /dev/null +++ b/firmware/target/sh/archos/boot.lds | |||
@@ -0,0 +1,81 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | OUTPUT_FORMAT(elf32-sh) | ||
5 | INPUT(target/sh/crt0.o) | ||
6 | |||
7 | #define DRAMSIZE (MEMORYSIZE * 0x100000) | ||
8 | |||
9 | #define DRAMORIG 0x09000000 | ||
10 | #define IRAMORIG 0x0f000000 | ||
11 | #define IRAMSIZE 0x1000 | ||
12 | #define FLASHORIG 0x02000000 + ROM_START | ||
13 | #define FLASHSIZE 256K - ROM_START | ||
14 | |||
15 | MEMORY | ||
16 | { | ||
17 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
18 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
19 | FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE | ||
20 | } | ||
21 | |||
22 | SECTIONS | ||
23 | { | ||
24 | .vectors : | ||
25 | { | ||
26 | _datacopy = .; | ||
27 | } > FLASH | ||
28 | |||
29 | .data : AT ( _datacopy ) | ||
30 | { | ||
31 | _datastart = .; | ||
32 | KEEP(*(.resetvectors)); | ||
33 | *(.resetvectors); | ||
34 | KEEP(*(.vectors)); | ||
35 | *(.vectors); | ||
36 | . = ALIGN(0x200); | ||
37 | *(.icode) | ||
38 | *(.irodata) | ||
39 | *(.idata) | ||
40 | *(.data*) | ||
41 | . = ALIGN(0x4); | ||
42 | _dataend = .; | ||
43 | . = ALIGN(0x10); /* Maintain proper alignment for .text section */ | ||
44 | } > IRAM | ||
45 | |||
46 | /* TRICK ALERT! Newer versions of the linker don't allow output sections | ||
47 | to overlap even if one of them is empty, so advance the location pointer | ||
48 | "by hand" */ | ||
49 | .text LOADADDR(.data) + SIZEOF(.data) : | ||
50 | { | ||
51 | *(.init.text) | ||
52 | *(.text*) | ||
53 | . = ALIGN(0x4); | ||
54 | } > FLASH | ||
55 | |||
56 | .rodata : | ||
57 | { | ||
58 | *(.rodata*) | ||
59 | . = ALIGN(0x4); | ||
60 | _iramcopy = .; | ||
61 | } > FLASH | ||
62 | |||
63 | .stack : | ||
64 | { | ||
65 | *(.stack) | ||
66 | _stackbegin = .; | ||
67 | stackbegin = .; | ||
68 | . += 0x2000; | ||
69 | _stackend = .; | ||
70 | stackend = .; | ||
71 | } > IRAM | ||
72 | |||
73 | .bss : | ||
74 | { | ||
75 | _edata = .; | ||
76 | *(.ibss) | ||
77 | *(.bss*) | ||
78 | *(COMMON) | ||
79 | _end = .; | ||
80 | } > IRAM | ||
81 | } | ||