summaryrefslogtreecommitdiff
path: root/x86-bare-metal/multiboot/kern.ld
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2025-04-24 00:21:02 +0200
committerJohannes Stoelp <johannes.stoelp@gmail.com>2025-04-24 00:21:02 +0200
commit23e0ccf7b5a0ccea545f231d35dbecc00011a9de (patch)
treefcabb2e084297bb51c2a12ee77404b891cca0df6 /x86-bare-metal/multiboot/kern.ld
parent20a854354918735c3289c5576a28fad18ca21757 (diff)
downloadzig-playground-main.tar.gz
zig-playground-main.zip
multiboot: add multiboot example kernelHEADmain
Diffstat (limited to 'x86-bare-metal/multiboot/kern.ld')
-rw-r--r--x86-bare-metal/multiboot/kern.ld27
1 files changed, 27 insertions, 0 deletions
diff --git a/x86-bare-metal/multiboot/kern.ld b/x86-bare-metal/multiboot/kern.ld
new file mode 100644
index 0000000..5a615c9
--- /dev/null
+++ b/x86-bare-metal/multiboot/kern.ld
@@ -0,0 +1,27 @@
+ENTRY(_start)
+
+SECTIONS
+{
+ . = 1M;
+ .mbhdr : {
+ KEEP(*(.mbhdr))
+ }
+ .text.boot : {
+ *(.text.boot)
+ }
+ .text : {
+ *(.text*)
+ }
+ .rodata ALIGN (0x1000) : {
+ *(.rodata*)
+ }
+ .data ALIGN (0x1000) : {
+ *(.data*)
+ }
+ .bss : {
+ sbss = .;
+ *(COMMON)
+ *(.bss*)
+ ebss = .;
+ }
+}