mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-07 13:45:03 -05:00
rombox: Do not copy .init section to ram on startup.
This is pointless to copy this code as it can be run in-place. Change-Id: I73b4f4a3337a88434af457c3f1e40b8d55a5a79e
This commit is contained in:
parent
cc64d9eb3b
commit
b3abcb807b
1 changed files with 11 additions and 18 deletions
|
|
@ -56,18 +56,11 @@ STARTUP(crt0.o)
|
||||||
#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
|
#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
|
||||||
#define CODECORIG ENDAUDIOADDR
|
#define CODECORIG ENDAUDIOADDR
|
||||||
|
|
||||||
/* .init is copied to codec buffer */
|
|
||||||
#define INITORIG CODECORIG
|
|
||||||
#define INITSIZE CODECSIZE
|
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
||||||
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||||
FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
|
FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
|
||||||
#ifdef HAVE_INIT_ATTR
|
|
||||||
INIT : ORIGIN = INITORIG, LENGTH = INITSIZE
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
|
|
@ -93,6 +86,9 @@ SECTIONS
|
||||||
KEEP(*(.resetvectors));
|
KEEP(*(.resetvectors));
|
||||||
KEEP(*(.vectors));
|
KEEP(*(.vectors));
|
||||||
. = ALIGN(0x200);
|
. = ALIGN(0x200);
|
||||||
|
#ifdef HAVE_INIT_ATTR
|
||||||
|
*(.initdata*)
|
||||||
|
#endif
|
||||||
*(.data*)
|
*(.data*)
|
||||||
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
||||||
_dataend = .;
|
_dataend = .;
|
||||||
|
|
@ -111,6 +107,14 @@ SECTIONS
|
||||||
{
|
{
|
||||||
*(.init.text)
|
*(.init.text)
|
||||||
KEEP(*(.startup*));
|
KEEP(*(.startup*));
|
||||||
|
#ifdef HAVE_INIT_ATTR
|
||||||
|
/* all this symbols are set to the same address so .init copy loop
|
||||||
|
will be skiped in crt0.S */
|
||||||
|
_initstart = .;
|
||||||
|
_initend = .;
|
||||||
|
_initcopy = .;
|
||||||
|
*(.init*)
|
||||||
|
#endif
|
||||||
*(.text*)
|
*(.text*)
|
||||||
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
||||||
} > FLASH
|
} > FLASH
|
||||||
|
|
@ -133,17 +137,6 @@ SECTIONS
|
||||||
_iramend = .;
|
_iramend = .;
|
||||||
} > IRAM
|
} > IRAM
|
||||||
|
|
||||||
#ifdef HAVE_INIT_ATTR
|
|
||||||
.init INITORIG : AT ( _iramcopy + SIZEOF(.iram) )
|
|
||||||
{
|
|
||||||
_initstart = .;
|
|
||||||
*(.init*)
|
|
||||||
*(.initdata*)
|
|
||||||
_initend = .;
|
|
||||||
} > INIT
|
|
||||||
_initcopy = LOADADDR(.init);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
.ibss (NOLOAD) :
|
.ibss (NOLOAD) :
|
||||||
{
|
{
|
||||||
_iedata = .;
|
_iedata = .;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue