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 CODECORIG ENDAUDIOADDR
|
||||
|
||||
/* .init is copied to codec buffer */
|
||||
#define INITORIG CODECORIG
|
||||
#define INITSIZE CODECSIZE
|
||||
|
||||
MEMORY
|
||||
{
|
||||
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
||||
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||
FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
|
||||
#ifdef HAVE_INIT_ATTR
|
||||
INIT : ORIGIN = INITORIG, LENGTH = INITSIZE
|
||||
#endif
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
|
|
@ -93,6 +86,9 @@ SECTIONS
|
|||
KEEP(*(.resetvectors));
|
||||
KEEP(*(.vectors));
|
||||
. = ALIGN(0x200);
|
||||
#ifdef HAVE_INIT_ATTR
|
||||
*(.initdata*)
|
||||
#endif
|
||||
*(.data*)
|
||||
. = ALIGN(0x4);
|
||||
_dataend = .;
|
||||
|
|
@ -111,6 +107,14 @@ SECTIONS
|
|||
{
|
||||
*(.init.text)
|
||||
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*)
|
||||
. = ALIGN(0x4);
|
||||
} > FLASH
|
||||
|
|
@ -133,17 +137,6 @@ SECTIONS
|
|||
_iramend = .;
|
||||
} > IRAM
|
||||
|
||||
#ifdef HAVE_INIT_ATTR
|
||||
.init INITORIG : AT ( _iramcopy + SIZEOF(.iram) )
|
||||
{
|
||||
_initstart = .;
|
||||
*(.init*)
|
||||
*(.initdata*)
|
||||
_initend = .;
|
||||
} > INIT
|
||||
_initcopy = LOADADDR(.init);
|
||||
#endif
|
||||
|
||||
.ibss (NOLOAD) :
|
||||
{
|
||||
_iedata = .;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue