summaryrefslogtreecommitdiff
path: root/firmware/rom.lds
diff options
context:
space:
mode:
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)
56#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) 56#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
57#define CODECORIG ENDAUDIOADDR 57#define CODECORIG ENDAUDIOADDR
58 58
59/* .init is copied to codec buffer */
60#define INITORIG CODECORIG
61#define INITSIZE CODECSIZE
62
63MEMORY 59MEMORY
64{ 60{
65 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE 61 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
66 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE 62 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
67 FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE 63 FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
68#ifdef HAVE_INIT_ATTR
69 INIT : ORIGIN = INITORIG, LENGTH = INITSIZE
70#endif
71} 64}
72 65
73SECTIONS 66SECTIONS
@@ -93,6 +86,9 @@ SECTIONS
93 KEEP(*(.resetvectors)); 86 KEEP(*(.resetvectors));
94 KEEP(*(.vectors)); 87 KEEP(*(.vectors));
95 . = ALIGN(0x200); 88 . = ALIGN(0x200);
89#ifdef HAVE_INIT_ATTR
90 *(.initdata*)
91#endif
96 *(.data*) 92 *(.data*)
97 . = ALIGN(0x4); 93 . = ALIGN(0x4);
98 _dataend = .; 94 _dataend = .;
@@ -111,6 +107,14 @@ SECTIONS
111 { 107 {
112 *(.init.text) 108 *(.init.text)
113 KEEP(*(.startup*)); 109 KEEP(*(.startup*));
110#ifdef HAVE_INIT_ATTR
111 /* all this symbols are set to the same address so .init copy loop
112 will be skiped in crt0.S */
113 _initstart = .;
114 _initend = .;
115 _initcopy = .;
116 *(.init*)
117#endif
114 *(.text*) 118 *(.text*)
115 . = ALIGN(0x4); 119 . = ALIGN(0x4);
116 } > FLASH 120 } > FLASH
@@ -133,17 +137,6 @@ SECTIONS
133 _iramend = .; 137 _iramend = .;
134 } > IRAM 138 } > IRAM
135 139
136#ifdef HAVE_INIT_ATTR
137 .init INITORIG : AT ( _iramcopy + SIZEOF(.iram) )
138 {
139 _initstart = .;
140 *(.init*)
141 *(.initdata*)
142 _initend = .;
143 } > INIT
144 _initcopy = LOADADDR(.init);
145#endif
146
147 .ibss (NOLOAD) : 140 .ibss (NOLOAD) :
148 { 141 {
149 _iedata = .; 142 _iedata = .;