aboutsummaryrefslogtreecommitdiff
path: root/src/linker.ld
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2024-04-01 01:50:23 +0300
committerMarin Ivanov <[email protected]>2024-04-01 01:50:23 +0300
commite4005e37848fe396dba45eacdaa5df948bec9fb8 (patch)
tree4c06e0dd6ffc20dbd184401d7a5667f4719ff8c7 /src/linker.ld
parent4676edf5d99a0c1ff0b50c0db0932ec1b163235c (diff)
import Zig Bare Bones project
ref: https://wiki.osdev.org/Zig_Bare_Bones
Diffstat (limited to 'src/linker.ld')
-rw-r--r--src/linker.ld26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/linker.ld b/src/linker.ld
new file mode 100644
index 0000000..429da33
--- /dev/null
+++ b/src/linker.ld
@@ -0,0 +1,26 @@
+ENTRY(_start)
+
+SECTIONS {
+ . = 1M;
+
+ .multiboot {
+ KEEP(*(.multiboot))
+ }
+
+ .text : ALIGN(4K) {
+ *(.text)
+ }
+
+ .rodata : ALIGN(4K) {
+ *(.rodata)
+ }
+
+ .data : ALIGN(4K) {
+ *(.data)
+ }
+
+ .bss : ALIGN(4K) {
+ *(COMMON)
+ *(.bss)
+ }
+}