Expand description
ELF64 loader for Strat9-OS.
Parses ELF64 headers and loads PT_LOAD segments into a user address space, then creates a kernel task that trampolines into Ring 3 via IRETQ.
Supports :
- ET_EXEC
- ET_DYN (PIE/static-PIE)
- ELF64 little-endian x86_64 binaries.
Structs§
- Loaded
ElfInfo - Result of loading an ELF image into an address space.
Constants§
- USER_
ADDR_ MAX - Maximum virtual address we accept for user-space mappings.
- USER_
STACK_ BASE - User stack location (below the non-canonical gap).
- USER_
STACK_ PAGES - Number of 4 KiB pages for the user stack (16 pages = 64 KiB).
- USER_
STACK_ TOP - Top of the user stack (stack grows down).
Functions§
- load_
and_ run_ elf - Load an ELF64 binary and schedule it as a Ring 3 user task.
- load_
and_ run_ elf_ with_ caps - Performs the load and run elf with caps operation.
- load_
elf_ image - Load an ELF binary into the provided address space. Returns the entry point address.
- load_
elf_ task_ with_ caps - Performs the load elf task with caps operation.
- read_
user_ mapped_ bytes_ pub - Reads user mapped bytes pub.
- write_
user_ mapped_ bytes_ pub - Writes user mapped bytes pub.
- write_
user_ u64_ pub - Writes user u64 pub.