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