mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-06-02 13:44:25 +02:00
Add a proper vfs driver into the kernel which handles file operations,
fix munmap number, remove the draw calls, make address space an option, copy only the top 256 bytes of the HHDM and map the ELF code inside userspace, add safe copying from userspace
This commit is contained in:
@@ -30,7 +30,7 @@ pub fn load_file(mapper: &mut OffsetPageTable, elf_bytes: &[u8]) -> (*const u8,
|
||||
|
||||
let elf_header_ptr = elf_bytes.as_ptr() as *const Elf64Ehdr;
|
||||
|
||||
return match unsafe { elf_header.e_type } {
|
||||
return match elf_header.e_type {
|
||||
ET_EXEC => unsafe { load_program(mapper, elf_header_ptr, elf_bytes, false) },
|
||||
ET_DYN => unsafe { load_program(mapper, elf_header_ptr, elf_bytes, true) },
|
||||
ET_REL => return (null(), 0),
|
||||
|
||||
Reference in New Issue
Block a user