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 /common/elf.c | |
| parent | 8bb1e280280c2f30740defca68ea643c56a3d880 (diff) | |
| download | kmi-9966b49db468de0168c7a455dfb5b4c66c413c4d.tar.gz kmi-9966b49db468de0168c7a455dfb5b4c66c413c4d.zip | |
Massive changes to jump to userspace
Diffstat (limited to 'common/elf.c')
| -rw-r--r-- | common/elf.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/elf.c b/common/elf.c new file mode 100644 index 0000000..7531bd1 --- /dev/null +++ b/common/elf.c @@ -0,0 +1,9 @@ +#include <apos/elf.h> +#include <apos/vmem.h> + +vm_t bin_entry(vm_t bin) +{ + struct elf_header *e = (struct elf_header *)bin; + /* TODO: check that address points to a valid ELF executable */ + return (vm_t)e->e_entry; +} |
