diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2014-01-10 21:46:43 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2014-01-17 19:03:06 +0100 |
commit | b31c856b842096e5128a86a8316083190527d467 (patch) | |
tree | 648a14c99b81f279d2cc6767f262d27ed5abc1e0 /firmware/target/coldfire/crt0.S | |
parent | d55e5698e587dda405ec53cceb6f3642768bd198 (diff) | |
download | rockbox-b31c856b842096e5128a86a8316083190527d467.tar.gz rockbox-b31c856b842096e5128a86a8316083190527d467.zip |
coldfire: Implement HAVE_INIT_ATTR magic
This reclaims ~6kB of ram.
Change-Id: Iafdc661b1cf4445669c08c79205043792b8d14c3
Reviewed-on: http://gerrit.rockbox.org/718
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Diffstat (limited to 'firmware/target/coldfire/crt0.S')
-rw-r--r-- | firmware/target/coldfire/crt0.S | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/target/coldfire/crt0.S b/firmware/target/coldfire/crt0.S index 881fcf908f..5e73131894 100644 --- a/firmware/target/coldfire/crt0.S +++ b/firmware/target/coldfire/crt0.S | |||
@@ -21,7 +21,7 @@ | |||
21 | #include "config.h" | 21 | #include "config.h" |
22 | #include "cpu.h" | 22 | #include "cpu.h" |
23 | 23 | ||
24 | .section .init.text,"ax",@progbits | 24 | .section .startup,"ax",@progbits |
25 | 25 | ||
26 | .global start | 26 | .global start |
27 | start: | 27 | start: |
@@ -290,6 +290,17 @@ start: | |||
290 | /* .iram copy is done first since it is reclaimed for other | 290 | /* .iram copy is done first since it is reclaimed for other |
291 | * uninitialized sections */ | 291 | * uninitialized sections */ |
292 | 292 | ||
293 | /* copy .init section */ | ||
294 | lea _initcopy,%a2 | ||
295 | lea _initstart,%a3 | ||
296 | lea _initend,%a4 | ||
297 | bra.b .initstart | ||
298 | .initloop: | ||
299 | move.l (%a2)+,(%a3)+ | ||
300 | .initstart: | ||
301 | cmp.l %a3,%a4 | ||
302 | bhi.b .initloop | ||
303 | |||
293 | /* copy the .iram section */ | 304 | /* copy the .iram section */ |
294 | lea _iramcopy,%a2 | 305 | lea _iramcopy,%a2 |
295 | lea _iramstart,%a3 | 306 | lea _iramstart,%a3 |