summaryrefslogtreecommitdiff
path: root/app/ld/_flash.ld
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-03-05 20:20:45 +0300
committerOxore <oxore@protonmail.com>2023-03-05 20:20:45 +0300
commitea807de65b0485ac58b6eae576209c64d4d5c4e9 (patch)
treeb4264d20e1d700cfd9e0ece9d847a825dd1dfc03 /app/ld/_flash.ld
parentdd01e7ed22cea652061f0d12cecf929e04b285e9 (diff)
Split app code and third party libraries
Diffstat (limited to 'app/ld/_flash.ld')
-rw-r--r--app/ld/_flash.ld33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/ld/_flash.ld b/app/ld/_flash.ld
new file mode 100644
index 0000000..ec94ea7
--- /dev/null
+++ b/app/ld/_flash.ld
@@ -0,0 +1,33 @@
+SECTIONS {
+ . = ORIGIN(FLASH);
+ .text : {
+ KEEP(*(.stack))
+ KEEP(*(.vectors))
+ KEEP(*(.vectors*))
+ KEEP(*(.text))
+ . = ALIGN(4);
+ *(.text*)
+ . = ALIGN(4);
+ KEEP(*(.rodata))
+ *(.rodata*)
+ . = ALIGN(4);
+ } >FLASH
+
+ .preinit_array ALIGN(4): {
+ __preinit_array_start = .;
+ KEEP(*(.preinit_array))
+ __preinit_array_end = .;
+ } >FLASH
+
+ .init_array ALIGN(4): {
+ __init_array_start = .;
+ KEEP(*(.init_array))
+ __init_array_end = .;
+ } >FLASH
+
+ .fini_array ALIGN(4): {
+ __fini_array_start = .;
+ KEEP(*(.fini_array))
+ __fini_array_end = .;
+ } >FLASH
+}