diff --git a/arch/x86/kernel/entry.asm b/arch/x86/kernel/entry.asm index c163f8a2..1d232933 100644 --- a/arch/x86/kernel/entry.asm +++ b/arch/x86/kernel/entry.asm @@ -24,7 +24,7 @@ [BITS 32] ; We use a special name to map this section at the begin of our kernel ; => Multiboot needs its magic number at the begin of the kernel -SECTION multiboot +SECTION .mboot global start start: mov esp, _sys_stack ; This points the stack to our new stack area @@ -55,6 +55,7 @@ mboot: dd end dd start +ALIGN 4 stublet: ; interpret multiboot information extern multiboot_init diff --git a/link.ld b/link.ld index 29f6243f..624cf6c6 100644 --- a/link.ld +++ b/link.ld @@ -1,4 +1,5 @@ OUTPUT_FORMAT("binary") +OUTPUT_ARCH("i386") ENTRY(start) phys = 0x00100000; @@ -7,7 +8,7 @@ SECTIONS .text phys : AT(phys) { kernel_start = .; code = .; - *(multiboot) + *(.mboot) *(.text) *(.rodata) . = ALIGN(4096);