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
|
|
@ -22,6 +22,10 @@ STARTUP(target/arm/rk27xx/crt0.o)
|
|||
#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
|
||||
#define CODECORIG (ENDAUDIOADDR)
|
||||
|
||||
/* .init is copied to codec buffer */
|
||||
#define INITORIG CODECORIG
|
||||
#define INITSIZE CODECSIZE
|
||||
|
||||
/* Where the codec buffer ends, and the plugin buffer starts */
|
||||
#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
|
||||
|
||||
|
|
@ -29,21 +33,14 @@ MEMORY
|
|||
{
|
||||
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
||||
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||
INIT : ORIGIN = INITORIG, LENGTH = INITSIZE
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
loadaddress = DRAMORIG;
|
||||
|
||||
.intvect : {
|
||||
_intvectstart = . ;
|
||||
KEEP(*(.intvect))
|
||||
_intvectend = . ;
|
||||
} > IRAM AT > DRAM
|
||||
_intvectcopy = LOADADDR(.intvect);
|
||||
|
||||
.text : {
|
||||
*(.init.text)
|
||||
*(.text*)
|
||||
*(.icode*)
|
||||
*(.glue_7*)
|
||||
|
|
@ -61,7 +58,27 @@ SECTIONS
|
|||
. = ALIGN(0x4);
|
||||
} > DRAM
|
||||
|
||||
.stack (NOLOAD) :
|
||||
/* NOLOAD sections at end start here. Any part of the binary image past
|
||||
* this point is discarded or copied elsewhere. */
|
||||
_noloaddram = .;
|
||||
|
||||
.intvect : {
|
||||
_intvectstart = . ;
|
||||
KEEP(*(.intvect))
|
||||
_intvectend = . ;
|
||||
} > IRAM AT > DRAM
|
||||
_intvectcopy = LOADADDR(.intvect);
|
||||
|
||||
.init : {
|
||||
. = ALIGN(4);
|
||||
_initstart = .;
|
||||
*(.init*)
|
||||
*(.initdata*)
|
||||
_initend = .;
|
||||
} > INIT AT > DRAM
|
||||
_initcopy = LOADADDR(.init);
|
||||
|
||||
.stack _noloaddram (NOLOAD) :
|
||||
{
|
||||
*(.stack)
|
||||
_stackbegin = .;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue