diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2008-03-13 03:48:23 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2008-03-13 03:48:23 +0000 |
commit | ef62d6891a4def12d43b7a562f165eeb93816461 (patch) | |
tree | 3c9e8720c846075568d2fe1157f8e3b6b48103db /firmware/target/arm/iriver/app.lds | |
parent | 2b5f9aec646aceaf24b243e38e1de316e1bc3475 (diff) | |
download | rockbox-ef62d6891a4def12d43b7a562f165eeb93816461.tar.gz rockbox-ef62d6891a4def12d43b7a562f165eeb93816461.zip |
Split up app.lds to the respective target directories. The portalplayer devices replicate app.lds since their target tree doesn't follow a syntax typical to the newer arm targets - the portalplayers could be cleaned up further. boot.lds and plugin.lds still need to be cleaned up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16651 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/iriver/app.lds')
-rw-r--r-- | firmware/target/arm/iriver/app.lds | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/firmware/target/arm/iriver/app.lds b/firmware/target/arm/iriver/app.lds new file mode 100644 index 0000000000..765a5f0389 --- /dev/null +++ b/firmware/target/arm/iriver/app.lds | |||
@@ -0,0 +1,160 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | |||
5 | OUTPUT_FORMAT(elf32-littlearm) | ||
6 | OUTPUT_ARCH(arm) | ||
7 | INPUT(target/arm/crt0-pp.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 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE | ||
19 | |||
20 | #define DRAMORIG 0x00000000 + STUBOFFSET | ||
21 | #define IRAMORIG 0x40000000 | ||
22 | #define IRAMSIZE 0xc000 | ||
23 | |||
24 | /* End of the audio buffer, where the codec buffer starts */ | ||
25 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
26 | |||
27 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
28 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
29 | |||
30 | MEMORY | ||
31 | { | ||
32 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
33 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
34 | } | ||
35 | |||
36 | SECTIONS | ||
37 | { | ||
38 | .text : | ||
39 | { | ||
40 | loadaddress = .; | ||
41 | _loadaddress = .; | ||
42 | . = ALIGN(0x200); | ||
43 | *(.init.text) | ||
44 | *(.text*) | ||
45 | *(.glue_7) | ||
46 | *(.glue_7t) | ||
47 | . = ALIGN(0x4); | ||
48 | } > DRAM | ||
49 | |||
50 | .rodata : | ||
51 | { | ||
52 | *(.rodata) /* problems without this, dunno why */ | ||
53 | *(.rodata*) | ||
54 | *(.rodata.str1.1) | ||
55 | *(.rodata.str1.4) | ||
56 | . = ALIGN(0x4); | ||
57 | |||
58 | /* Pseudo-allocate the copies of the data sections */ | ||
59 | _datacopy = .; | ||
60 | } > DRAM | ||
61 | |||
62 | /* TRICK ALERT! For RAM execution, we put the .data section at the | ||
63 | same load address as the copy. Thus, we don't waste extra RAM | ||
64 | when we don't actually need the copy. */ | ||
65 | .data : AT ( _datacopy ) | ||
66 | { | ||
67 | _datastart = .; | ||
68 | *(.data*) | ||
69 | . = ALIGN(0x4); | ||
70 | _dataend = .; | ||
71 | } > DRAM | ||
72 | |||
73 | /DISCARD/ : | ||
74 | { | ||
75 | *(.eh_frame) | ||
76 | } | ||
77 | |||
78 | .vectors 0x0 : | ||
79 | { | ||
80 | _vectorsstart = .; | ||
81 | *(.vectors); | ||
82 | _vectorsend = .; | ||
83 | } AT> DRAM | ||
84 | |||
85 | _vectorscopy = LOADADDR(.vectors); | ||
86 | |||
87 | .iram IRAMORIG : | ||
88 | { | ||
89 | _iramstart = .; | ||
90 | *(.icode) | ||
91 | *(.irodata) | ||
92 | *(.idata) | ||
93 | _iramend = .; | ||
94 | } > IRAM AT> DRAM | ||
95 | |||
96 | _iramcopy = LOADADDR(.iram); | ||
97 | |||
98 | .ibss (NOLOAD) : | ||
99 | { | ||
100 | _iedata = .; | ||
101 | *(.ibss) | ||
102 | . = ALIGN(0x4); | ||
103 | _iend = .; | ||
104 | } > IRAM | ||
105 | |||
106 | .idle_stacks : | ||
107 | { | ||
108 | *(.idle_stacks) | ||
109 | #if NUM_CORES > 1 | ||
110 | cpu_idlestackbegin = .; | ||
111 | . += IDLE_STACK_SIZE; | ||
112 | cpu_idlestackend = .; | ||
113 | #endif | ||
114 | cop_idlestackbegin = .; | ||
115 | . += IDLE_STACK_SIZE; | ||
116 | cop_idlestackend = .; | ||
117 | } > IRAM | ||
118 | |||
119 | .stack : | ||
120 | { | ||
121 | *(.stack) | ||
122 | stackbegin = .; | ||
123 | . += 0x2000; | ||
124 | stackend = .; | ||
125 | } > IRAM | ||
126 | |||
127 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram) + SIZEOF(.vectors): | ||
128 | { | ||
129 | _edata = .; | ||
130 | *(.bss*) | ||
131 | *(COMMON) | ||
132 | . = ALIGN(0x4); | ||
133 | _end = .; | ||
134 | } > DRAM | ||
135 | |||
136 | .audiobuf ALIGN(4) : | ||
137 | { | ||
138 | _audiobuffer = .; | ||
139 | audiobuffer = .; | ||
140 | } > DRAM | ||
141 | |||
142 | .audiobufend ENDAUDIOADDR: | ||
143 | { | ||
144 | audiobufend = .; | ||
145 | _audiobufend = .; | ||
146 | } > DRAM | ||
147 | |||
148 | .codec ENDAUDIOADDR: | ||
149 | { | ||
150 | codecbuf = .; | ||
151 | _codecbuf = .; | ||
152 | } | ||
153 | |||
154 | .plugin ENDADDR: | ||
155 | { | ||
156 | _pluginbuf = .; | ||
157 | pluginbuf = .; | ||
158 | } | ||
159 | } | ||
160 | |||