small changes

This commit is contained in:
notsomeidiot123 2024-10-05 13:03:53 -04:00
parent 45d628c373
commit ba550f2f07
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,6 @@
ENTRY(_start) ENTRY(_start)
/* OUTPUT_FORMAT(elf32-i386) */ OUTPUT_FORMAT(elf32-i386)
OUTPUT_FORMAT(binary) /* OUTPUT_FORMAT(binary) */
OUTPUT(kernel.elf) OUTPUT(kernel.elf)
SEARCH_DIR(bin/kernel) SEARCH_DIR(bin/kernel)
SECTIONS{ SECTIONS{

View File

@ -305,10 +305,13 @@ part_2:
mov edi, kernel_file mov edi, kernel_file
call open_file call open_file
mov esi, eax mov esi, eax
mov edi, 0x10000 mov edi, kload_paddr
call read_file call read_file
jc load_fail jc load_fail
mov esi, kload_paddr
call load_elf
jmp $ jmp $
load_kernel: load_kernel:
get_mmap: get_mmap:
@ -603,6 +606,7 @@ mmove:
load_elf: load_elf:
;parse elf and relocate each section to it's appropriate location ;parse elf and relocate each section to it's appropriate location
;esi: address of loaded kernel;
;kernel info ;kernel info
k_info: k_info:
.memory_map_ptr: dd 0x2000 .memory_map_ptr: dd 0x2000