summaryrefslogtreecommitdiff
path: root/firmware/decompressor/link.lds
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/decompressor/link.lds')
-rwxr-xr-xfirmware/decompressor/link.lds74
1 files changed, 74 insertions, 0 deletions
diff --git a/firmware/decompressor/link.lds b/firmware/decompressor/link.lds
new file mode 100755
index 0000000000..9cb4be8830
--- /dev/null
+++ b/firmware/decompressor/link.lds
@@ -0,0 +1,74 @@
1OUTPUT_FORMAT(elf32-sh)
2
3#define DRAMORIG 0x09000000
4#define DRAMSIZE (MEMORYSIZE * 0x00100000)
5#define IRAMORIG 0x0f000000
6#define IRAMSIZE 0x00001000
7
8MEMORY
9{
10 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
11 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
12}
13
14SECTIONS
15{
16 .vectors :
17 {
18 _loadaddress = .;
19 _dramend = . + DRAMSIZE;
20 *(.vectors)
21 . = ALIGN(0x200);
22 } > DRAM
23
24 .text :
25 {
26 *(.start)
27 *(.text)
28 . = ALIGN(0x4);
29 } > DRAM
30
31 .rodata :
32 {
33 *(.rodata*)
34 *(.rodata.str1.1)
35 *(.rodata.str1.4)
36 . = ALIGN(0x4);
37 } > DRAM
38
39 .data :
40 {
41 *(.data)
42 . = ALIGN(0x4);
43 _imgstart = .;
44 *(.image)
45 . = ALIGN(0x4);
46 _imgend = .;
47 _iramcopy = .;
48 } > DRAM
49
50 .iram IRAMORIG : AT ( _iramcopy )
51 {
52 _iramstart = .;
53 *(.icode)
54 *(.idata)
55 . = ALIGN(0x4);
56 _iramend = .;
57 } > IRAM
58
59 .stack :
60 {
61 _stackbegin = .;
62 *(.stack)
63 . += 0x0800;
64 _stackend = .;
65 } > IRAM
66
67 .bss :
68 {
69 _edata = .;
70 *(.bss)
71 . = ALIGN(0x4);
72 _end = .;
73 } > DRAM
74}