Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys add ep_entryoffset to exec_package so one can calculate ...
details: https://anonhg.NetBSD.org/src/rev/196718b95c08
branches: trunk
changeset: 327370:196718b95c08
user: matt <matt%NetBSD.org@localhost>
date: Thu Mar 06 09:30:37 2014 +0000
description:
add ep_entryoffset to exec_package so one can calculate the relocabase
of an ET_DYN image.
diffstat:
sys/kern/exec_elf.c | 6 ++++--
sys/sys/exec.h | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diffs (51 lines):
diff -r e123109a83c4 -r 196718b95c08 sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c Thu Mar 06 09:24:07 2014 +0000
+++ b/sys/kern/exec_elf.c Thu Mar 06 09:30:37 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.62 2014/02/27 09:58:05 maxv Exp $ */
+/* $NetBSD: exec_elf.c,v 1.63 2014/03/06 09:30:37 matt Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.62 2014/02/27 09:58:05 maxv Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.63 2014/03/06 09:30:37 matt Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -162,6 +162,7 @@
for (i = 0; i < eh->e_phnum; i++)
ph[i].p_vaddr += offset;
+ epp->ep_entryoffset = offset;
eh->e_entry += offset;
}
@@ -835,6 +836,7 @@
}
ap->arg_interp = epp->ep_vmcmds.evs_cmds[nused].ev_addr;
+ epp->ep_entryoffset = interp_offset;
epp->ep_entry = ap->arg_interp + interp_offset;
PNBUF_PUT(interp);
} else
diff -r e123109a83c4 -r 196718b95c08 sys/sys/exec.h
--- a/sys/sys/exec.h Thu Mar 06 09:24:07 2014 +0000
+++ b/sys/sys/exec.h Thu Mar 06 09:30:37 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.h,v 1.144 2014/01/03 20:52:47 dsl Exp $ */
+/* $NetBSD: exec.h,v 1.145 2014/03/06 09:30:37 matt Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -200,6 +200,7 @@
vaddr_t ep_minsaddr; /* proc's min stack addr ("bottom") */
vsize_t ep_ssize; /* size of process's stack */
vaddr_t ep_entry; /* process's entry point */
+ vaddr_t ep_entryoffset; /* offset to entry point */
vaddr_t ep_vm_minaddr; /* bottom of process address space */
vaddr_t ep_vm_maxaddr; /* top of process address space */
u_int ep_flags; /* flags; see below. */
Home |
Main Index |
Thread Index |
Old Index