diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/app.lds')
-rw-r--r-- | firmware/target/arm/s3c2440/app.lds | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/firmware/target/arm/s3c2440/app.lds b/firmware/target/arm/s3c2440/app.lds new file mode 100644 index 0000000000..3528ed86bf --- /dev/null +++ b/firmware/target/arm/s3c2440/app.lds | |||
@@ -0,0 +1,147 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/s3c2440/crt0.o) | ||
8 | |||
9 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE | ||
10 | #define CODECSIZE CODEC_SIZE | ||
11 | |||
12 | #ifdef DEBUG | ||
13 | #define STUBOFFSET 0x10000 | ||
14 | #else | ||
15 | #define STUBOFFSET 0 | ||
16 | #endif | ||
17 | |||
18 | #include "cpu.h" | ||
19 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - 0x100 - STUBOFFSET - PLUGINSIZE - CODECSIZE - LCD_BUFFER_SIZE - TTB_SIZE | ||
20 | |||
21 | #define DRAMORIG 0x00000100 + STUBOFFSET | ||
22 | #define IRAMORIG DRAMORIG | ||
23 | #define IRAM DRAM | ||
24 | #define IRAMSIZE 0x1000 | ||
25 | |||
26 | /* End of the audio buffer, where the codec buffer starts */ | ||
27 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
28 | |||
29 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
30 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
31 | |||
32 | MEMORY | ||
33 | { | ||
34 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
35 | } | ||
36 | |||
37 | SECTIONS | ||
38 | { | ||
39 | .text : | ||
40 | { | ||
41 | loadaddress = .; | ||
42 | _loadaddress = .; | ||
43 | . = ALIGN(0x200); | ||
44 | *(.init.text) | ||
45 | *(.text*) | ||
46 | *(.glue_7) | ||
47 | *(.glue_7t) | ||
48 | . = ALIGN(0x4); | ||
49 | } > DRAM | ||
50 | |||
51 | .rodata : | ||
52 | { | ||
53 | *(.rodata) /* problems without this, dunno why */ | ||
54 | *(.rodata*) | ||
55 | *(.rodata.str1.1) | ||
56 | *(.rodata.str1.4) | ||
57 | . = ALIGN(0x4); | ||
58 | |||
59 | /* Pseudo-allocate the copies of the data sections */ | ||
60 | _datacopy = .; | ||
61 | } > DRAM | ||
62 | |||
63 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
64 | same load address as the copy. Thus, we don't waste extra RAM | ||
65 | when we don't actually need the copy. */ | ||
66 | .data : AT ( _datacopy ) | ||
67 | { | ||
68 | _datastart = .; | ||
69 | *(.data*) | ||
70 | . = ALIGN(0x4); | ||
71 | _dataend = .; | ||
72 | } > DRAM | ||
73 | |||
74 | /DISCARD/ : | ||
75 | { | ||
76 | *(.eh_frame) | ||
77 | } | ||
78 | |||
79 | .vectors 0x0 : | ||
80 | { | ||
81 | _vectorsstart = .; | ||
82 | *(.vectors); | ||
83 | _vectorsend = .; | ||
84 | } AT> DRAM | ||
85 | |||
86 | _vectorscopy = LOADADDR(.vectors); | ||
87 | |||
88 | .iram : | ||
89 | { | ||
90 | _iramstart = .; | ||
91 | *(.icode) | ||
92 | *(.irodata) | ||
93 | *(.idata) | ||
94 | _iramend = .; | ||
95 | } > DRAM | ||
96 | |||
97 | _iramcopy = LOADADDR(.iram); | ||
98 | |||
99 | .ibss (NOLOAD) : | ||
100 | { | ||
101 | _iedata = .; | ||
102 | *(.ibss) | ||
103 | . = ALIGN(0x4); | ||
104 | _iend = .; | ||
105 | } > DRAM | ||
106 | |||
107 | .stack : | ||
108 | { | ||
109 | *(.stack) | ||
110 | stackbegin = .; | ||
111 | . += 0x2000; | ||
112 | stackend = .; | ||
113 | } > DRAM | ||
114 | |||
115 | .bss : | ||
116 | { | ||
117 | _edata = .; | ||
118 | *(.bss*) | ||
119 | *(COMMON) | ||
120 | . = ALIGN(0x4); | ||
121 | _end = .; | ||
122 | } > DRAM | ||
123 | |||
124 | .audiobuf ALIGN(4) : | ||
125 | { | ||
126 | _audiobuffer = .; | ||
127 | audiobuffer = .; | ||
128 | } > DRAM | ||
129 | |||
130 | .audiobufend ENDAUDIOADDR: | ||
131 | { | ||
132 | audiobufend = .; | ||
133 | _audiobufend = .; | ||
134 | } > DRAM | ||
135 | |||
136 | .codec ENDAUDIOADDR: | ||
137 | { | ||
138 | codecbuf = .; | ||
139 | _codecbuf = .; | ||
140 | } | ||
141 | |||
142 | .plugin ENDADDR: | ||
143 | { | ||
144 | _pluginbuf = .; | ||
145 | pluginbuf = .; | ||
146 | } | ||
147 | } | ||