From 9966b49db468de0168c7a455dfb5b4c66c413c4d Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 19 Dec 2021 17:10:36 +0200 Subject: Massive changes to jump to userspace --- include/apos/elf.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 include/apos/elf.h (limited to 'include/apos/elf.h') diff --git a/include/apos/elf.h b/include/apos/elf.h new file mode 100644 index 0000000..492c414 --- /dev/null +++ b/include/apos/elf.h @@ -0,0 +1,33 @@ +#ifndef APOS_ELF_H +#define APOS_ELF_H + +#include +#include +#include + +__packed struct elf_header { + uint64_t ei_magic; + uint8_t ei_class; + uint8_t ei_data; + uint8_t ei_version; + uint8_t ei_osabi; + uint8_t ei_abiversion; + uint8_t e_pad; + uint16_t e_type; + uint16_t e_machine; + uint32_t e_version; + void *e_entry; + void *e_phoff; + void *e_shoff; + uint32_t e_flags; + uint16_t e_ehsize; + uint16_t e_phentsize; + uint16_t e_phnum; + uint16_t e_shentsize; + uint16_t e_shnum; + uint16_t e_shstrndx; +}; + +vm_t bin_entry(vm_t bin); + +#endif /* APOS_ELF_H */ -- cgit v1.3