diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-24 17:56:38 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-24 17:56:38 +0000 |
commit | 8aa84f4a6404d94dbd3d62aee50c18756c163dee (patch) | |
tree | 17debb02248dc77b449c90601282f1d3d819ba39 /firmware | |
parent | 4b9cb9b5b4419207aca40040bd57a60d6e3734e1 (diff) | |
download | rockbox-8aa84f4a6404d94dbd3d62aee50c18756c163dee.tar.gz rockbox-8aa84f4a6404d94dbd3d62aee50c18756c163dee.zip |
Major fixes to please newer versions of the linker
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4936 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/app.lds | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/firmware/app.lds b/firmware/app.lds index bacc645044..015ed70bd8 100644 --- a/firmware/app.lds +++ b/firmware/app.lds | |||
@@ -104,39 +104,53 @@ SECTIONS | |||
104 | { | 104 | { |
105 | *(.resetvectors); | 105 | *(.resetvectors); |
106 | *(.vectors); | 106 | *(.vectors); |
107 | . = ALIGN(0x200); | ||
108 | *(.init.text) | ||
109 | } > DRAM | 107 | } > DRAM |
110 | 108 | ||
111 | .text : | 109 | .text : |
112 | { | 110 | { |
111 | . = ALIGN(0x200); | ||
112 | *(.init.text) | ||
113 | *(.text) | 113 | *(.text) |
114 | . = ALIGN(0x4); | 114 | . = ALIGN(0x4); |
115 | } > DRAM | 115 | } > DRAM |
116 | 116 | ||
117 | .data : | 117 | .rodata : |
118 | { | 118 | { |
119 | *(.data) | 119 | *(.rodata) |
120 | *(.rodata.str1.4) | ||
120 | . = ALIGN(0x4); | 121 | . = ALIGN(0x4); |
121 | _datacopy = .; /* dummy here, only for ROM based */ | 122 | |
122 | _datastart = .; | 123 | /* Pseudo-allocate the copies of the data sections */ |
123 | _dataend = .; | 124 | _datacopy = .; |
124 | } > DRAM | 125 | } > DRAM |
125 | 126 | ||
126 | .rodata : | 127 | /* TRICK ALERT! For RAM execution, we put the .data section at the |
128 | same load address as the copy. Thus, we don't waste extra RAM | ||
129 | when we don't actually need the copy. */ | ||
130 | .data : AT ( _datacopy ) | ||
127 | { | 131 | { |
128 | *(.rodata) | 132 | _datastart = .; |
129 | *(.rodata.str1.4) | 133 | *(.data) |
130 | . = ALIGN(0x4); | 134 | . = ALIGN(0x4); |
135 | _dataend = .; | ||
136 | _iramcopy = .; | ||
131 | } > DRAM | 137 | } > DRAM |
132 | 138 | ||
133 | .stack : | 139 | .iram 0xf000000 : AT ( _iramcopy) |
140 | { | ||
141 | _iramstart = .; | ||
142 | *(.icode) | ||
143 | *(.idata) | ||
144 | _iramend = .; | ||
145 | } > IRAM | ||
146 | |||
147 | /* TRICK ALERT! We want 0x2000 bytes of stack, but we set the section | ||
148 | size smaller, and allow the stack to grow into the .iram copy */ | ||
149 | .stack ADDR(.data)+SIZEOF(.data) + SIZEOF(.iram): | ||
134 | { | 150 | { |
135 | *(.stack) | 151 | *(.stack) |
136 | _stackbegin = .; | 152 | _stackbegin = .; |
137 | /* We put the copy of the .iram section here to save space */ | 153 | . += 0x2000-SIZEOF(.iram); |
138 | _iramcopy = .; | ||
139 | . += 0x2000; | ||
140 | _stackend = .; | 154 | _stackend = .; |
141 | } > DRAM | 155 | } > DRAM |
142 | 156 | ||
@@ -148,15 +162,6 @@ SECTIONS | |||
148 | _end = .; | 162 | _end = .; |
149 | } > DRAM | 163 | } > DRAM |
150 | 164 | ||
151 | #ifdef DEBUG | ||
152 | .heap : | ||
153 | { | ||
154 | _poolstart = .; | ||
155 | . = 0x20000; | ||
156 | _poolend = .; | ||
157 | } > DRAM | ||
158 | #endif | ||
159 | |||
160 | .mp3buf : | 165 | .mp3buf : |
161 | { | 166 | { |
162 | _mp3buffer = .; | 167 | _mp3buffer = .; |
@@ -172,12 +177,5 @@ SECTIONS | |||
172 | _pluginbuf = .; | 177 | _pluginbuf = .; |
173 | } | 178 | } |
174 | 179 | ||
175 | .iram 0xf000000 : AT ( _iramcopy ) | ||
176 | { | ||
177 | _iramstart = .; | ||
178 | *(.icode) | ||
179 | *(.idata) | ||
180 | _iramend = .; | ||
181 | } > IRAM | ||
182 | #endif | 180 | #endif |
183 | } | 181 | } |