aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-11-08 15:12:55 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2024-11-08 15:12:55 +0200
commit04b1f2ddc98d0ab0c93fdf29fc163f3f09fbf44e (patch)
treeb147b34e7dae1e8439d0f0973bd2da053819af8d
parent227374239ce397eb6b471bd8a058538ffc326756 (diff)
downloadkmi-04b1f2ddc98d0ab0c93fdf29fc163f3f09fbf44e.tar.gz
kmi-04b1f2ddc98d0ab0c93fdf29fc163f3f09fbf44e.zip
document __prepare_exec
-rw-r--r--src/elf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/elf.c b/src/elf.c
index d590109..adcc263 100644
--- a/src/elf.c
+++ b/src/elf.c
@@ -162,6 +162,14 @@ static stat_t __map_exec(struct tcb *t,
return OK;
}
+/**
+ * Map static binary.
+ *
+ * @param t Process to map binary in.
+ * @param ei_c Elf class.
+ * @param elf Address of static binary.
+ * @return Entry address or NULL.
+ */
static vm_t __prepare_exec(struct tcb *t, uint8_t ei_c, vm_t elf)
{
vm_t phstart = ptradd(elf, elf_header_prop(ei_c, elf, e_phoff));