diff options
author | Aiden Gall <aiden@aidengall.xyz> | 2024-05-14 19:43:28 +0100 |
---|---|---|
committer | Aiden Gall <aiden@aidengall.xyz> | 2024-05-14 19:51:05 +0100 |
commit | 93585dc4da3be099e1ffe7e757aa7caff2e1f013 (patch) | |
tree | c1335acdd74cff12e545ce386ab2dbd176eaa473 /link.ld |
initial commit
Diffstat (limited to 'link.ld')
-rw-r--r-- | link.ld | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,39 @@ +ENTRY(kmain) +OUTPUT_FORMAT(binary) + +KERNEL_VMA = 0x100000; + +SECTIONS { + . = 0x7c00; + + .text.boot : { + boot/boot.o (.text.boot) + _boot_end = .; + } + + .text KERNEL_VMA : AT(_boot_end) { + *(.text.startup) + *(.text) + *(.rodata*) + . = ALIGN(0x1000); + } + + .data : { + *(.data) + . = ALIGN(0x1000); + } + + .eh_frame : { + *(.eh_frame) + . = ALIGN(0x1000); + } + + .bss : { + *(.bss) + . = ALIGN(0x1000); + } + + /DISCARD/ : { + *(.comment) + } +} |