summaryrefslogtreecommitdiff
path: root/link.ld
diff options
context:
space:
mode:
authortaitep <taitep@taitep.se>2025-12-21 17:04:18 +0100
committertaitep <taitep@taitep.se>2025-12-21 17:04:18 +0100
commit25dd685345b4bba7418eca4252e1b65ce20356cd (patch)
treec7c16b686f5cda154cf8b7b4898a1cfdd38fb8fd /link.ld
parentc05ba60c3c6ebe89a3db666c316929e0d0d2fdfa (diff)
Add a linker script and example uart echo program
Diffstat (limited to 'link.ld')
-rw-r--r--link.ld22
1 files changed, 22 insertions, 0 deletions
diff --git a/link.ld b/link.ld
new file mode 100644
index 0000000..3868b23
--- /dev/null
+++ b/link.ld
@@ -0,0 +1,22 @@
+ENTRY(_start)
+
+SECTIONS {
+ . = 0x80000000;
+
+ .text : ALIGN(4) {
+ *(.text*)
+ }
+
+ .rodata : ALIGN(8) {
+ *(.rodata*)
+ }
+
+ .data : ALIGN(8) {
+ *(.data*)
+ }
+
+ .bss : ALIGN(8) {
+ *(.bss*)
+ *(COMMON)
+ }
+}