mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
rk27xx: Implement HAVE_INIT_ATTR magic
This reclaims over 7kB of ram. Change-Id: I4a89c9a673ada7959311f320900060f6db303c07
This commit is contained in:
parent
837cad0d38
commit
9cd3444e27
3 changed files with 42 additions and 10 deletions
|
|
@ -149,6 +149,20 @@ entry_point:
|
|||
strhi r1, [r2], #4
|
||||
bhi 1b
|
||||
|
||||
#ifdef HAVE_INIT_ATTR
|
||||
/* Copy init section to the codec buffer
|
||||
* before .bss zeroing
|
||||
*/
|
||||
ldr r2, =_initstart
|
||||
ldr r3, =_initend
|
||||
ldr r4, =_initcopy
|
||||
1:
|
||||
cmp r3, r2
|
||||
ldrhi r1, [r4], #4
|
||||
strhi r1, [r2], #4
|
||||
bhi 1b
|
||||
#endif
|
||||
|
||||
/* Initialise bss, ibss section to zero */
|
||||
ldr r2, =_edata
|
||||
ldr r3, =_end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue