This commit is contained in:
nub31
2025-08-24 17:44:11 +02:00
parent 56025d55f9
commit ff664b0687
4 changed files with 37 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
%define LEN header_end - header_start
%define CHECKSUM -(MAGIC + ARCH + LEN)
section .multiboot2
header_start:
align 4
dd MAGIC
@@ -25,7 +26,7 @@ global _start
_start:
mov esp, stack_top
call kernel_main
hang:
cli
hang:
hlt
jmp hang

28
src/boot.ld Normal file
View File

@@ -0,0 +1,28 @@
ENTRY(_start)
SECTIONS
{
. = 2M;
.text BLOCK(4K) : ALIGN(4K)
{
*(.multiboot2)
*(.text)
}
.rodata BLOCK(4K) : ALIGN(4K)
{
*(.rodata)
}
.data BLOCK(4K) : ALIGN(4K)
{
*(.data)
}
.bss BLOCK(4K) : ALIGN(4K)
{
*(COMMON)
*(.bss)
}
}