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 | |
parent | 6879af9784f3cfe58741c484d3bdc6f78ac8bb36 (diff) | |
download | rockbox-21d026d1d649331ae67316e84635abba0ca31fc7.tar.gz 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
-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) | |||
54 | 54 | ||
55 | /* End of the audio buffer, where the codec/plugin buffer starts */ | 55 | /* End of the audio buffer, where the codec/plugin buffer starts */ |
56 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | 56 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) |
57 | #define CODECORIG ENDAUDIOADDR | ||
58 | |||
59 | /* .init is copied to codec buffer */ | ||
60 | #define INITORIG CODECORIG | ||
61 | #define INITSIZE CODECSIZE | ||
57 | 62 | ||
58 | MEMORY | 63 | MEMORY |
59 | { | 64 | { |
60 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | 65 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE |
61 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | 66 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE |
62 | FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE | 67 | FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE |
68 | INIT : ORIGIN = INITORIG, LENGTH = INITSIZE | ||
63 | } | 69 | } |
70 | |||
64 | SECTIONS | 71 | SECTIONS |
65 | { | 72 | { |
66 | .flashheader : | 73 | .flashheader : |
@@ -101,6 +108,7 @@ SECTIONS | |||
101 | .text LOADADDR(.data) + SIZEOF(.data) : | 108 | .text LOADADDR(.data) + SIZEOF(.data) : |
102 | { | 109 | { |
103 | *(.init.text) | 110 | *(.init.text) |
111 | KEEP(*(.startup*)); | ||
104 | *(.text*) | 112 | *(.text*) |
105 | . = ALIGN(0x4); | 113 | . = ALIGN(0x4); |
106 | } > FLASH | 114 | } > FLASH |
@@ -123,6 +131,17 @@ SECTIONS | |||
123 | _iramend = .; | 131 | _iramend = .; |
124 | } > IRAM | 132 | } > IRAM |
125 | 133 | ||
134 | #ifdef HAVE_INIT_ATTR | ||
135 | .init INITORIG : AT ( _iramcopy + SIZEOF(.iram) ) | ||
136 | { | ||
137 | _initstart = .; | ||
138 | *(.init*) | ||
139 | *(.initdata*) | ||
140 | _initend = .; | ||
141 | } > INIT | ||
142 | _initcopy = LOADADDR(.init); | ||
143 | #endif | ||
144 | |||
126 | .ibss (NOLOAD) : | 145 | .ibss (NOLOAD) : |
127 | { | 146 | { |
128 | _iedata = .; | 147 | _iedata = .; |