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 */
|
/* End of the audio buffer, where the codec/plugin buffer starts */
|
||||||
#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
|
#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
|
||||||
|
#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
|
||||||
|
INIT : ORIGIN = INITORIG, LENGTH = INITSIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
.flashheader :
|
.flashheader :
|
||||||
|
@ -101,6 +108,7 @@ SECTIONS
|
||||||
.text LOADADDR(.data) + SIZEOF(.data) :
|
.text LOADADDR(.data) + SIZEOF(.data) :
|
||||||
{
|
{
|
||||||
*(.init.text)
|
*(.init.text)
|
||||||
|
KEEP(*(.startup*));
|
||||||
*(.text*)
|
*(.text*)
|
||||||
. = ALIGN(0x4);
|
. = ALIGN(0x4);
|
||||||
} > FLASH
|
} > FLASH
|
||||||
|
@ -123,6 +131,17 @@ 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…
Reference in a new issue