summaryrefslogtreecommitdiff
path: root/test.ld
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-04-25 09:22:08 +0300
committerOxore <oxore@protonmail.com>2023-04-25 09:22:50 +0300
commit184c627adb609d74112a1a1aadb762caa8cd8d1e (patch)
tree441b3189705bc0286c6e8d1b0892bc4b704e8238 /test.ld
parentaf46d6991ceb719ac59d6218791c41fa3978e695 (diff)
Add linker script, add more comment clarifications
Diffstat (limited to 'test.ld')
-rw-r--r--test.ld16
1 files changed, 16 insertions, 0 deletions
diff --git a/test.ld b/test.ld
new file mode 100644
index 0000000..22a08e2
--- /dev/null
+++ b/test.ld
@@ -0,0 +1,16 @@
+MEMORY {
+ ROM(rx) : ORIGIN = 0x00000000, LENGTH = 4M
+}
+
+SECTIONS {
+ . = ORIGIN(ROM);
+ .text : {
+ KEEP(*(.text))
+ . = ALIGN(2);
+ *(.text*)
+ . = ALIGN(2);
+ KEEP(*(.rodata))
+ *(.rodata*)
+ . = ALIGN(2);
+ } >ROM
+}