summaryrefslogtreecommitdiffstats
path: root/firmware/rom.lds
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2014-01-20 10:42:02 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2014-01-20 10:42:02 +0100
commitb3abcb807b7f6202158a47668af7f2505b6dd25e (patch)
tree1795684ff751a65083aff0d296f4759ff1b82f5d /firmware/rom.lds
parentcc64d9eb3bb74e987093d59c6a4af4b7bc76076d (diff)
downloadrockbox-b3abcb807b7f6202158a47668af7f2505b6dd25e.tar.gz
rockbox-b3abcb807b7f6202158a47668af7f2505b6dd25e.tar.bz2
rockbox-b3abcb807b7f6202158a47668af7f2505b6dd25e.zip
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
Diffstat (limited to 'firmware/rom.lds')
-rw-r--r--firmware/rom.lds29
1 files changed, 11 insertions, 18 deletions
diff --git a/firmware/rom.lds b/firmware/rom.lds
index 7770ce9e5e..c959bf272d 100644
--- a/firmware/rom.lds
+++ b/firmware/rom.lds
@@ -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 = .;