ELF
include/elf.h View source View on GitHubStructs
Section titled “Structs”elf64_ident
Section titled “elf64_ident” struct elf64_ident (7 fields) source
elf64_ehdr
Section titled “elf64_ehdr” struct elf64_ehdr (14 fields) source
elf64_phdr
Section titled “elf64_phdr” struct elf64_phdr (8 fields) source
Functions
Section titled “Functions”elf_load
Section titled “elf_load”uint64_t elf_load(const void *elf_data) source returns entry point
enter_userspace
Section titled “enter_userspace”cc_noreturn void enter_userspace(
uintptr_t entry_point,
uintptr_t user_stack_top,
uint16_t user_cs,
uint16_t user_ss,
uintptr_t user_pml4_phys
) source syscall_setup
Section titled “syscall_setup”void syscall_setup(void *syscall_entry) source map_user_stack
Section titled “map_user_stack”uintptr_t map_user_stack(uintptr_t user_pml4_phys) source elf_map
Section titled “elf_map”void elf_map(uintptr_t user_pml4_phys, void *elf_data) source Macros
Section titled “Macros”PT_LOAD
Section titled “PT_LOAD”#define PT_LOAD 1 source #define PF_X 0x1 source #define PF_W 0x2 source #define PF_R 0x4 source