diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-19 17:10:36 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-19 17:10:36 +0200 |
| commit | 9966b49db468de0168c7a455dfb5b4c66c413c4d (patch) | |
| tree | df31febe5e1ae52bae68ebe1df8b4469b97e0546 /include/apos/elf.h | |
| parent | 8bb1e280280c2f30740defca68ea643c56a3d880 (diff) | |
| download | kmi-9966b49db468de0168c7a455dfb5b4c66c413c4d.tar.gz kmi-9966b49db468de0168c7a455dfb5b4c66c413c4d.zip | |
Massive changes to jump to userspace
Diffstat (limited to 'include/apos/elf.h')
| -rw-r--r-- | include/apos/elf.h | 33 |
1 files changed, 33 insertions, 0 deletions
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 <apos/attrs.h> +#include <apos/types.h> +#include <apos/vmem.h> + +__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 */ |
