diff options
author | 2019-11-29 20:53:13 +0000 | |
---|---|---|
committer | 2019-11-29 20:53:13 +0000 | |
commit | 934484026c7a2904fb164ecd78330ff78899d549 (patch) | |
tree | 7a299b6dbcde9ccc290c58929b8dadf4ee37e6fe /sys/lib/libsa/loadfile_elf.c | |
parent | Move kcov(4)'s p_kd into the "zero on create" section to simplify fork code (diff) | |
download | wireguard-openbsd-934484026c7a2904fb164ecd78330ff78899d549.tar.xz wireguard-openbsd-934484026c7a2904fb164ecd78330ff78899d549.zip |
Add an element to the marks array to store the virtual address of the
entry point.
ok mlarkin@, deraadt@
Diffstat (limited to 'sys/lib/libsa/loadfile_elf.c')
-rw-r--r-- | sys/lib/libsa/loadfile_elf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/lib/libsa/loadfile_elf.c b/sys/lib/libsa/loadfile_elf.c index ffe0ad2ff28..0399ede1d76 100644 --- a/sys/lib/libsa/loadfile_elf.c +++ b/sys/lib/libsa/loadfile_elf.c @@ -1,5 +1,5 @@ /* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */ -/* $OpenBSD: loadfile_elf.c,v 1.15 2019/10/29 02:55:49 deraadt Exp $ */ +/* $OpenBSD: loadfile_elf.c,v 1.16 2019/11/29 20:53:13 kettenis Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -284,6 +284,7 @@ ELFNAME(exec)(int fd, Elf_Ehdr *elf, uint64_t *marks, int flags) marks[MARK_START] = LOADADDR(minp); marks[MARK_ENTRY] = LOADADDR(elf->e_entry); + marks[MARK_VENTRY] = elf->e_entry; marks[MARK_NSYM] = 1; /* XXX: Kernel needs >= 0 */ marks[MARK_SYM] = LOADADDR(elfp); marks[MARK_END] = LOADADDR(maxp); |