diff options
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; +} |
