coldfire: fix rom build
Properly handle .init section in rom build and accomodate
the change in crt0.S introduced in b31c856
Change-Id: Icbf26a87162165da149232de264dc3671ca8ae96
This commit is contained in:
parent
6879af9784
commit
21d026d1d6
1 changed files with 19 additions and 0 deletions
|
@ -54,13 +54,20 @@ STARTUP(crt0.o)
|
|||
|
||||
/* End of the audio buffer, where the codec/plugin buffer starts */
|
||||
#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
|
||||
INIT : ORIGIN = INITORIG, LENGTH = INITSIZE
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.flashheader :
|
||||
|
@ -101,6 +108,7 @@ SECTIONS
|
|||
.text LOADADDR(.data) + SIZEOF(.data) :
|
||||
{
|
||||
*(.init.text)
|
||||
KEEP(*(.startup*));
|
||||
*(.text*)
|
||||
. = ALIGN(0x4);
|
||||
} > FLASH
|
||||
|
@ -123,6 +131,17 @@ 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…
Reference in a new issue