small changes
This commit is contained in:
parent
45d628c373
commit
ba550f2f07
|
|
@ -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{
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue