summaryrefslogtreecommitdiff
path: root/linker_script.ld
diff options
context:
space:
mode:
Diffstat (limited to 'linker_script.ld')
-rw-r--r--linker_script.ld10
1 files changed, 9 insertions, 1 deletions
diff --git a/linker_script.ld b/linker_script.ld
index 37b90a4..8ae98d0 100644
--- a/linker_script.ld
+++ b/linker_script.ld
@@ -18,8 +18,16 @@ SECTIONS
. = ORIGIN(flash) + 0x0dc;
} >flash
+ /** Init routines */
+ _sinits = ADDR(.vectors) + SIZEOF(.vectors);
+ .inits _sinits : ALIGN(0x04) {
+ KEEP(*(SORT_BY_NAME(.inits .inits.*)));
+ _einits = .;
+ . = ALIGN(0x04);
+ } > flash
+
/** Text data is stored after the vector table. */
- PROVIDE(_stext = ADDR(.vectors) + SIZEOF(.vectors));
+ PROVIDE(_stext = ADDR(.inits) + SIZEOF(.inits));
.text _stext : ALIGN(0x04) {
*(.text .text.*);
. = ALIGN(0x04);