summaryrefslogtreecommitdiff
path: root/rom.ld
diff options
context:
space:
mode:
Diffstat (limited to 'rom.ld')
-rw-r--r--rom.ld20
1 files changed, 20 insertions, 0 deletions
diff --git a/rom.ld b/rom.ld
new file mode 100644
index 0000000..403a83d
--- /dev/null
+++ b/rom.ld
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: Unlicense
+ */
+
+MEMORY {
+ ROM(rx) : ORIGIN = 0x08000000, LENGTH = 4M
+}
+
+SECTIONS {
+ . = ORIGIN(ROM);
+ .text : {
+ KEEP(*(.rom_header))
+ KEEP(*(.text))
+ . = ALIGN(4);
+ *(.text*)
+ . = ALIGN(4);
+ KEEP(*(.rodata))
+ *(.rodata*)
+ . = ALIGN(4);
+ } >ROM
+}