diff --git a/x86/harddrive.asm b/x86/harddrive.asm index 3adda0d3eef8b73831dda5e8a52c4a114d7f76fc..2a50fed6a2506a55d8aa60626a4152fbbc75d8fc 100644 --- a/x86/harddrive.asm +++ b/x86/harddrive.asm @@ -17,5 +17,3 @@ kernel_file: .end: .length equ kernel_file.end - kernel_file .length_sectors equ .length / 512 - -times 1024*1024-($-$$) db 0 diff --git a/x86/kernel.ld b/x86/kernel.ld index 09d99583bb92b480339bc775f7e2a225ef28fd39..c81df10dc7d8485959527f4b8aa455de81f2bdcc 100644 --- a/x86/kernel.ld +++ b/x86/kernel.ld @@ -1,16 +1,14 @@ ENTRY(kstart) OUTPUT_FORMAT(elf64-x86-64) -KERNEL_OFFSET = 0; +KERNEL_OFFSET = 0x100000; SECTIONS { - . = 0x100000; + . = KERNEL_OFFSET; . += SIZEOF_HEADERS; . = ALIGN(4096); - . += KERNEL_OFFSET; - .text : AT(ADDR(.text) - KERNEL_OFFSET) { __text_start = .; *(.text*)