diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2014-01-18 23:11:25 +0100 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2014-01-18 23:13:28 +0100 |
commit | 21d026d1d649331ae67316e84635abba0ca31fc7 (patch) | |
tree | afed20f3cb8e8cd32afe26906866d39375566822 /firmware/rom.lds | |
parent | 6879af9784f3cfe58741c484d3bdc6f78ac8bb36 (diff) | |
download | rockbox-21d026d1d649331ae67316e84635abba0ca31fc7.tar.gz rockbox-21d026d1d649331ae67316e84635abba0ca31fc7.tar.bz2 rockbox-21d026d1d649331ae67316e84635abba0ca31fc7.zip |
coldfire: fix rom build
Properly handle .init section in rom build and accomodate
the change in crt0.S introduced in b31c856
Change-Id: Icbf26a87162165da149232de264dc3671ca8ae96
Diffstat (limited to 'firmware/rom.lds')
-rw-r--r-- | firmware/rom.lds | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/firmware/rom.lds b/firmware/rom.lds index e0ce0b1728..abfa311839 100644 --- a/firmware/rom.lds +++ b/firmware/rom.lds @@ -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 = .; |