summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-07-16 21:32:48 -0400
committerIan Moffett <ian@osmora.org>2024-07-16 21:32:48 -0400
commitc22af10c12d87a3d9beda7afa94c95b313536d06 (patch)
tree755e475354efcbd40711fe2baefd4f53b404f5d3 /sys
parent4029ffaf2dde58100b06637cc248b68ac2d3f8b4 (diff)
kernel: exec: Save base vaddr in exec_range
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r--sys/include/sys/exec.h5
-rw-r--r--sys/kern/exec_elf64.c1
2 files changed, 4 insertions, 2 deletions
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;
}
}