Simple ELF program loader
Now any initrd file is treated like a program image and passed to the loader to load as a process. Very rudimentary elf loading just allocates pages, copies sections, and sets the ELF's entrypoint as the RIP to iretq to.
This commit is contained in:
@@ -209,17 +209,3 @@ ramdisk_process_loader:
|
||||
add rsp, 16 ; because the ISRs add err/num
|
||||
iretq
|
||||
|
||||
|
||||
global taskA
|
||||
taskA:
|
||||
push rbp
|
||||
mov rbp, rsp
|
||||
mov rdi, 0
|
||||
mov rax, 0xaaaaaaaaaaaaaaaa
|
||||
|
||||
.loop:
|
||||
syscall
|
||||
jmp .loop
|
||||
|
||||
global taskAend
|
||||
taskAend:
|
||||
|
||||
Reference in New Issue
Block a user