From c22af10c12d87a3d9beda7afa94c95b313536d06 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 16 Jul 2024 21:32:48 -0400 Subject: kernel: exec: Save base vaddr in exec_range Signed-off-by: Ian Moffett --- sys/include/sys/exec.h | 5 +++-- sys/kern/exec_elf64.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/include/sys/exec.h b/sys/include/sys/exec.h index f5fac97..810e89e 100644 --- a/sys/include/sys/exec.h +++ b/sys/include/sys/exec.h @@ -53,8 +53,9 @@ STACK_PUSH(PTR, TAG); struct exec_range { - uintptr_t start; - uintptr_t end; + paddr_t start; + paddr_t end; + vaddr_t vbase; }; struct auxval { diff --git a/sys/kern/exec_elf64.c b/sys/kern/exec_elf64.c index 8e15839..b207fbb 100644 --- a/sys/kern/exec_elf64.c +++ b/sys/kern/exec_elf64.c @@ -220,6 +220,7 @@ elf64_load(const char *pathname, struct proc *td, struct exec_prog *prog) loadmap[i].start = physmem; loadmap[i].end = physmem + map_len; + loadmap[i].vbase = phdr->p_vaddr; } } -- cgit v1.2.3