diff options
| author | jdolecek <jdolecek@NetBSD.org> | 2001-09-18 19:36:32 +0000 |
|---|---|---|
| committer | jdolecek <jdolecek@NetBSD.org> | 2001-09-18 19:36:32 +0000 |
| commit | ef8abe0767caa50d4da87a2f8b8ccb6bcc17f917 (patch) | |
| tree | 5131e0f78c37d9d9b65c18bf5b4b73a79864c5c8 /sys | |
| parent | 2c07dd9842f85654cbfc65538a25d2360ca536fd (diff) | |
Make the setregs hook emulation-specific, rather than executable
format specific.
Struct emul has a e_setregs hook back, which points to emulation-specific
setregs function. es_setregs of struct execsw now only points to
optional executable-specific setup function (this is only used for
ECOFF).
Diffstat (limited to 'sys')
38 files changed, 108 insertions, 88 deletions
diff --git a/sys/arch/alpha/alpha/machdep.c b/sys/arch/alpha/alpha/machdep.c index e7dbd686970..03d11f6d746 100644 --- a/sys/arch/alpha/alpha/machdep.c +++ b/sys/arch/alpha/alpha/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.251 2001/09/18 18:15:50 wiz Exp $ */ +/* $NetBSD: machdep.c,v 1.252 2001/09/18 19:36:34 jdolecek Exp $ */ /*- * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.251 2001/09/18 18:15:50 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.252 2001/09/18 19:36:34 jdolecek Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1998,7 +1998,6 @@ cpu_exec_ecoff_setregs(p, epp, stack) { struct ecoff_exechdr *execp = (struct ecoff_exechdr *)epp->ep_hdr; - setregs(p, epp, stack); p->p_md.md_tf->tf_regs[FRAME_GP] = execp->a.gp_value; } diff --git a/sys/arch/mips/mips/cpu_exec.c b/sys/arch/mips/mips/cpu_exec.c index ee9746ad0f9..2e5970ff7aa 100644 --- a/sys/arch/mips/mips/cpu_exec.c +++ b/sys/arch/mips/mips/cpu_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_exec.c,v 1.28 2001/09/17 17:43:06 jdolecek Exp $ */ +/* $NetBSD: cpu_exec.c,v 1.29 2001/09/18 19:36:34 jdolecek Exp $ */ /* * Copyright (c) 1992, 1993 @@ -144,7 +144,6 @@ cpu_exec_ecoff_setregs(p, epp, stack) struct ecoff_exechdr *execp = (struct ecoff_exechdr *)epp->ep_hdr; struct frame *f = (struct frame *)p->p_md.md_regs; - setregs(p, epp, stack); f->f_regs[GP] = (register_t)execp->a.gp_value; } diff --git a/sys/compat/aout/aout_exec.c b/sys/compat/aout/aout_exec.c index 1e2c7bdd29b..3fc115eed8c 100644 --- a/sys/compat/aout/aout_exec.c +++ b/sys/compat/aout/aout_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: aout_exec.c,v 1.11 2001/06/18 02:00:52 christos Exp $ */ +/* $NetBSD: aout_exec.c,v 1.12 2001/09/18 19:36:38 jdolecek Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -78,6 +78,7 @@ struct emul emul_netbsd_aout = { trapsignal, sigcode, esigcode, + setregs, NULL, NULL, NULL, diff --git a/sys/compat/aoutm68k/aoutm68k_exec.c b/sys/compat/aoutm68k/aoutm68k_exec.c index 5e191d500cc..b4a46216a36 100644 --- a/sys/compat/aoutm68k/aoutm68k_exec.c +++ b/sys/compat/aoutm68k/aoutm68k_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: aoutm68k_exec.c,v 1.6 2001/06/18 02:00:52 christos Exp $ */ +/* $NetBSD: aoutm68k_exec.c,v 1.7 2001/09/18 19:36:38 jdolecek Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -73,6 +73,7 @@ struct emul emul_netbsd_aoutm68k = { trapsignal, sigcode, esigcode, + setregs, NULL, NULL, NULL, diff --git a/sys/compat/freebsd/freebsd_exec.c b/sys/compat/freebsd/freebsd_exec.c index 35782f84a27..e86371130ea 100644 --- a/sys/compat/freebsd/freebsd_exec.c +++ b/sys/compat/freebsd/freebsd_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_exec.c,v 1.15 2001/06/18 02:00:52 christos Exp $ */ +/* $NetBSD: freebsd_exec.c,v 1.16 2001/09/18 19:36:39 jdolecek Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -62,6 +62,7 @@ const struct emul emul_freebsd = { trapsignal, freebsd_sigcode, freebsd_esigcode, + freebsd_setregs, NULL, NULL, NULL, diff --git a/sys/compat/hpux/hpux_exec.c b/sys/compat/hpux/hpux_exec.c index eec01e53050..9cdd2b5b63f 100644 --- a/sys/compat/hpux/hpux_exec.c +++ b/sys/compat/hpux/hpux_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: hpux_exec.c,v 1.26 2001/06/18 02:00:52 christos Exp $ */ +/* $NetBSD: hpux_exec.c,v 1.27 2001/09/18 19:36:39 jdolecek Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -113,6 +113,7 @@ const struct emul emul_hpux = { trapsignal, sigcode, esigcode, + hpux_setregs, NULL, NULL, NULL, diff --git a/sys/compat/ibcs2/ibcs2_exec.c b/sys/compat/ibcs2/ibcs2_exec.c index fe74f1fd840..28c479ea619 100644 --- a/sys/compat/ibcs2/ibcs2_exec.c +++ b/sys/compat/ibcs2/ibcs2_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec.c,v 1.47 2001/06/18 02:00:52 christos Exp $ */ +/* $NetBSD: ibcs2_exec.c,v 1.48 2001/09/18 19:36:39 jdolecek Exp $ */ /* * Copyright (c) 1994, 1995, 1998 Scott Bartram @@ -81,6 +81,7 @@ const struct emul emul_ibcs2 = { trapsignal, ibcs2_sigcode, ibcs2_esigcode, + ibcs2_setregs, ibcs2_e_proc_exec, NULL, NULL, diff --git a/sys/compat/linux/common/linux_exec.c b/sys/compat/linux/common/linux_exec.c index 7c55e06bd69..2d1318901b5 100644 --- a/sys/compat/linux/common/linux_exec.c +++ b/sys/compat/linux/common/linux_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.c,v 1.52 2001/06/18 02:00:53 christos Exp $ */ +/* $NetBSD: linux_exec.c,v 1.53 2001/09/18 19:36:39 jdolecek Exp $ */ /*- * Copyright (c) 1994, 1995, 1998, 2000 The NetBSD Foundation, Inc. @@ -124,6 +124,7 @@ const struct emul emul_linux = { linux_trapsignal, linux_sigcode, linux_esigcode, + linux_setregs, linux_e_proc_exec, linux_e_proc_fork, linux_e_proc_exit, diff --git a/sys/compat/mach/mach_exec.c b/sys/compat/mach/mach_exec.c index faf80b6e2c9..4cb52ee136e 100644 --- a/sys/compat/mach/mach_exec.c +++ b/sys/compat/mach/mach_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: mach_exec.c,v 1.2 2001/07/29 21:26:07 christos Exp $ */ +/* $NetBSD: mach_exec.c,v 1.3 2001/09/18 19:36:40 jdolecek Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -77,6 +77,7 @@ const struct emul emul_mach = { trapsignal, sigcode, esigcode, + setregs, NULL, NULL, NULL, diff --git a/sys/compat/netbsd32/netbsd32_netbsd.c b/sys/compat/netbsd32/netbsd32_netbsd.c index ad6e0825935..31b5f102ee5 100644 --- a/sys/compat/netbsd32/netbsd32_netbsd.c +++ b/sys/compat/netbsd32/netbsd32_netbsd.c @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_netbsd.c,v 1.60 2001/06/19 00:36:21 fvdl Exp $ */ +/* $NetBSD: netbsd32_netbsd.c,v 1.61 2001/09/18 19:36:40 jdolecek Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -120,6 +120,7 @@ const struct emul emul_netbsd32 = { trapsignal, netbsd32_sigcode, netbsd32_esigcode, + netbsd32_setregs, NULL, NULL, NULL, diff --git a/sys/compat/osf1/osf1_exec.c b/sys/compat/osf1/osf1_exec.c index 8fa93c4f898..eb9215d1232 100644 --- a/sys/compat/osf1/osf1_exec.c +++ b/sys/compat/osf1/osf1_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_exec.c,v 1.25 2001/06/18 02:00:53 christos Exp $ */ +/* $NetBSD: osf1_exec.c,v 1.26 2001/09/18 19:36:40 jdolecek Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -63,6 +63,7 @@ const struct emul emul_osf1 = { trapsignal, osf1_sigcode, osf1_esigcode, + setregs, NULL, NULL, NULL, diff --git a/sys/compat/sunos/sunos_exec.c b/sys/compat/sunos/sunos_exec.c index b3fa9238727..fe521434b7d 100644 --- a/sys/compat/sunos/sunos_exec.c +++ b/sys/compat/sunos/sunos_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunos_exec.c,v 1.34 2001/06/18 02:00:54 christos Exp $ */ +/* $NetBSD: sunos_exec.c,v 1.35 2001/09/18 19:36:40 jdolecek Exp $ */ /* * Copyright (c) 1993 Theo de Raadt @@ -37,6 +37,7 @@ #include <sys/mount.h> #include <sys/signalvar.h> #include <sys/vnode.h> +#include <sys/exec.h> #include <compat/sunos/sunos.h> #include <compat/sunos/sunos_syscall.h> @@ -66,6 +67,7 @@ struct emul emul_sunos = { trapsignal, sunos_sigcode, sunos_esigcode, + setregs, NULL, NULL, NULL, diff --git a/sys/compat/sunos32/sunos32_exec.c b/sys/compat/sunos32/sunos32_exec.c index f9ba0ea2759..80ea081b5a7 100644 --- a/sys/compat/sunos32/sunos32_exec.c +++ b/sys/compat/sunos32/sunos32_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunos32_exec.c,v 1.7 2001/06/18 02:00:54 christos Exp $ */ +/* $NetBSD: sunos32_exec.c,v 1.8 2001/09/18 19:36:41 jdolecek Exp $ */ /* * Copyright (c) 2001 Matthew R. Green @@ -64,6 +64,7 @@ struct emul emul_sunos = { trapsignal, sunos_sigcode, sunos_esigcode, + netbsd32_setregs, NULL, NULL, NULL, diff --git a/sys/compat/svr4/svr4_exec.c b/sys/compat/svr4/svr4_exec.c index 5c0753f04f1..ebad9230fb6 100644 --- a/sys/compat/svr4/svr4_exec.c +++ b/sys/compat/svr4/svr4_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_exec.c,v 1.45 2001/06/18 02:00:54 christos Exp $ */ +/* $NetBSD: svr4_exec.c,v 1.46 2001/09/18 19:36:41 jdolecek Exp $ */ /*- * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc. @@ -46,6 +46,7 @@ #include <compat/svr4/svr4_syscall.h> #include <compat/svr4/svr4_errno.h> #include <compat/svr4/svr4_signal.h> +#include <compat/svr4/svr4_exec.h> extern char svr4_sigcode[], svr4_esigcode[]; extern struct sysent svr4_sysent[]; @@ -69,6 +70,7 @@ const struct emul emul_svr4 = { trapsignal, svr4_sigcode, svr4_esigcode, + svr4_setregs, NULL, NULL, NULL, diff --git a/sys/compat/svr4_32/svr4_32_exec.c b/sys/compat/svr4_32/svr4_32_exec.c index 50f3c548ae6..ab1894e692f 100644 --- a/sys/compat/svr4_32/svr4_32_exec.c +++ b/sys/compat/svr4_32/svr4_32_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_exec.c,v 1.4 2001/06/18 02:00:54 christos Exp $ */ +/* $NetBSD: svr4_32_exec.c,v 1.5 2001/09/18 19:36:41 jdolecek Exp $ */ /*- * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc. @@ -71,6 +71,7 @@ const struct emul emul_svr4_32 = { trapsignal, svr4_32_sigcode, svr4_32_esigcode, + svr4_32_setregs, NULL, NULL, NULL, diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c index 2f07cbc6307..98849e6bd4f 100644 --- a/sys/compat/ultrix/ultrix_misc.c +++ b/sys/compat/ultrix/ultrix_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: ultrix_misc.c,v 1.72 2001/09/17 17:47:47 jdolecek Exp $ */ +/* $NetBSD: ultrix_misc.c,v 1.73 2001/09/18 19:36:41 jdolecek Exp $ */ /* * Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author) @@ -172,6 +172,7 @@ const struct emul emul_ultrix = { trapsignal, ultrix_sigcode, ultrix_esigcode, + setregs, NULL, NULL, NULL, diff --git a/sys/kern/exec_conf.c b/sys/kern/exec_conf.c index a92818155ce..4b753490ea8 100644 --- a/sys/kern/exec_conf.c +++ b/sys/kern/exec_conf.c @@ -1,4 +1,4 @@ -/* $NetBSD: exec_conf.c,v 1.58 2001/07/14 02:06:34 christos Exp $ */ +/* $NetBSD: exec_conf.c,v 1.59 2001/09/18 19:36:33 jdolecek Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -167,7 +167,7 @@ const struct execsw execsw_builtin[] = { #ifdef COMPAT_NETBSD32 { sizeof(struct netbsd32_exec), exec_netbsd32_makecmds, { NULL }, &emul_netbsd32, EXECSW_PRIO_FIRST, - 0, netbsd32_copyargs, netbsd32_setregs }, /* sparc 32 bit */ + 0, netbsd32_copyargs, NULL }, /* sparc 32 bit */ #endif { sizeof(struct exec), exec_aout_makecmds, { NULL }, #ifdef COMPAT_AOUT @@ -178,12 +178,12 @@ const struct execsw execsw_builtin[] = { &emul_netbsd, #endif /* COMPAT_AOUT */ EXECSW_PRIO_ANY, - 0, copyargs, setregs }, /* a.out binaries */ + 0, copyargs, NULL }, /* a.out binaries */ #endif #ifdef EXEC_COFF { COFF_HDR_SIZE, exec_coff_makecmds, { NULL }, &emul_netbsd, EXECSW_PRIO_ANY, - 0, copyargs, setregs }, /* coff binaries */ + 0, copyargs, NULL }, /* coff binaries */ #endif #ifdef EXEC_ECOFF #ifdef COMPAT_OSF1 @@ -212,61 +212,61 @@ const struct execsw execsw_builtin[] = { { ELF32NAME2(netbsd32,probe) }, &emul_netbsd32, EXECSW_PRIO_FIRST, howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - netbsd32_elf32_copyargs, netbsd32_setregs }, /* NetBSD32 32bit ELF bins */ + netbsd32_elf32_copyargs, NULL }, /* NetBSD32 32bit ELF bins */ /* This one should go first so it matches instead of netbsd */ #endif { sizeof (Elf32_Ehdr), exec_elf32_makecmds, { ELF32NAME2(netbsd,probe) }, &emul_netbsd, EXECSW_PRIO_ANY, howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - elf32_copyargs, setregs }, /* NetBSD 32bit ELF bins */ + elf32_copyargs, NULL }, /* NetBSD 32bit ELF bins */ #ifdef COMPAT_FREEBSD { sizeof (Elf32_Ehdr), exec_elf32_makecmds, { ELF32NAME2(freebsd,probe) }, &emul_freebsd, EXECSW_PRIO_ANY, FREEBSD_ELF_AUX_ARGSIZ, - elf32_copyargs, freebsd_setregs }, /* FreeBSD 32bit ELF bins (not 64bit safe )*/ + elf32_copyargs, NULL }, /* FreeBSD 32bit ELF bins (not 64bit safe )*/ #endif #ifdef COMPAT_LINUX { sizeof (Elf32_Ehdr), exec_elf32_makecmds, { ELF32NAME2(linux,probe) }, &emul_linux, EXECSW_PRIO_ANY, LINUX_ELF_AUX_ARGSIZ, - LINUX_COPYARGS_FUNCTION, setregs }, /* Linux 32bit ELF bins */ + LINUX_COPYARGS_FUNCTION, NULL }, /* Linux 32bit ELF bins */ #endif #if defined(EXEC_MACHO) && defined(COMPAT_MACH) { sizeof (struct exec_macho_fat_header), exec_macho_makecmds, { .mach_probe_func = exec_mach_probe }, &emul_mach, EXECSW_PRIO_ANY, MAXPATHLEN + 1, - exec_mach_copyargs, setregs }, /* Mach 32bit MACH-O bins */ + exec_mach_copyargs, NULL }, /* Mach 32bit MACH-O bins */ #endif #ifdef COMPAT_SVR4_32 { sizeof (Elf32_Ehdr), exec_elf32_makecmds, { ELF32NAME2(svr4_32,probe) }, &emul_svr4_32, EXECSW_PRIO_ANY, SVR4_32_AUX_ARGSIZ, - svr4_32_copyargs, svr4_32_setregs }, /* SVR4 32bit ELF bins (not 64bit safe) */ + svr4_32_copyargs, NULL }, /* SVR4 32bit ELF bins (not 64bit safe) */ #endif #ifdef COMPAT_SVR4 { sizeof (Elf32_Ehdr), exec_elf32_makecmds, { ELF32NAME2(svr4,probe) }, &emul_svr4, EXECSW_PRIO_ANY, SVR4_AUX_ARGSIZ, - svr4_copyargs, svr4_setregs }, /* SVR4 32bit ELF bins (not 64bit safe) */ + svr4_copyargs, NULL }, /* SVR4 32bit ELF bins (not 64bit safe) */ #endif #ifdef COMPAT_IBCS2 { sizeof (Elf32_Ehdr), exec_elf32_makecmds, { ELF32NAME2(ibcs2,probe) }, &emul_ibcs2, EXECSW_PRIO_ANY, - IBCS2_ELF_AUX_ARGSIZ, elf32_copyargs, setregs }, + IBCS2_ELF_AUX_ARGSIZ, elf32_copyargs, NULL }, /* SCO 32bit ELF bins (not 64bit safe) */ #endif #ifdef EXEC_ELF_CATCHALL { sizeof (Elf32_Ehdr), exec_elf32_makecmds, { NULL }, &emul_netbsd, EXECSW_PRIO_LAST, howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - elf32_copyargs, setregs }, /* catch all - run as NetBSD 32bit ELF */ + elf32_copyargs, NULL }, /* catch all - run as NetBSD 32bit ELF */ #endif #endif /* EXEC_ELF32 */ #ifdef EXEC_ELF64 @@ -275,77 +275,77 @@ const struct execsw execsw_builtin[] = { { ELF64NAME2(netbsd,probe) }, &emul_netbsd, EXECSW_PRIO_ANY, howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)), - elf64_copyargs, setregs }, /* NetBSD 64bit ELF bins */ + elf64_copyargs, NULL }, /* NetBSD 64bit ELF bins */ #ifdef COMPAT_LINUX { sizeof (Elf64_Ehdr), exec_elf64_makecmds, { ELF64NAME2(linux,probe) }, &emul_linux, EXECSW_PRIO_ANY, LINUX_ELF_AUX_ARGSIZ, - linux_elf64_copyargs, setregs }, /* Linux 64bit ELF bins */ + linux_elf64_copyargs, NULL }, /* Linux 64bit ELF bins */ #endif #ifdef COMPAT_SVR4 { sizeof (Elf64_Ehdr), exec_elf64_makecmds, { ELF64NAME2(svr4,probe) }, &emul_svr4, EXECSW_PRIO_ANY, SVR4_AUX_ARGSIZ64, - svr4_copyargs64, svr4_setregs }, /* SVR4 64bit ELF bins (not 64bit safe) */ + svr4_copyargs64, NULL }, /* SVR4 64bit ELF bins (not 64bit safe) */ #endif #ifdef EXEC_ELF_CATCHALL { sizeof (Elf64_Ehdr), exec_elf64_makecmds, { NULL }, &emul_netbsd, EXECSW_PRIO_ANY, howmany(ELF_AUX_ENTRIES * sizeof(Aux64Info), sizeof (Elf64_Addr)), - elf64_copyargs, setregs }, /* catch all - run as NetBSD 64bit ELF */ + elf64_copyargs, NULL }, /* catch all - run as NetBSD 64bit ELF */ #endif #endif /* EXEC_ELF64 */ #ifdef COMPAT_SUNOS #ifdef COMPAT_NETBSD32 { SUNOS32_AOUT_HDR_SIZE, exec_sunos32_aout_makecmds, { NULL }, &emul_sunos, EXECSW_PRIO_ANY, - 0, netbsd32_copyargs, netbsd32_setregs }, /* SunOS a.out, 64-bit kernel */ + 0, netbsd32_copyargs, NULL }, /* SunOS a.out, 64-bit kernel */ #else { SUNOS_AOUT_HDR_SIZE, exec_sunos_aout_makecmds, { NULL }, &emul_sunos, EXECSW_PRIO_ANY, - 0, copyargs, setregs }, /* SunOS a.out */ + 0, copyargs, NULL }, /* SunOS a.out */ #endif #endif #if defined(COMPAT_LINUX) && defined(EXEC_AOUT) { LINUX_AOUT_HDR_SIZE, exec_linux_aout_makecmds, { NULL }, &emul_linux, EXECSW_PRIO_ANY, - LINUX_AOUT_AUX_ARGSIZ, linux_aout_copyargs, linux_setregs }, /* linux a.out */ + LINUX_AOUT_AUX_ARGSIZ, linux_aout_copyargs, NULL }, /* linux a.out */ #endif #ifdef COMPAT_IBCS2 { COFF_HDR_SIZE, exec_ibcs2_coff_makecmds, { NULL }, &emul_ibcs2, EXECSW_PRIO_ANY, - 0, copyargs, ibcs2_setregs }, /* coff binaries */ + 0, copyargs, NULL }, /* coff binaries */ { XOUT_HDR_SIZE, exec_ibcs2_xout_makecmds, { NULL }, &emul_ibcs2, EXECSW_PRIO_ANY, - 0, copyargs, ibcs2_setregs }, /* x.out binaries */ + 0, copyargs, NULL }, /* x.out binaries */ #endif #if defined(COMPAT_FREEBSD) && defined(EXEC_AOUT) { FREEBSD_AOUT_HDR_SIZE, exec_freebsd_aout_makecmds, { NULL }, &emul_freebsd, EXECSW_PRIO_ANY, - 0, copyargs, freebsd_setregs }, /* a.out */ + 0, copyargs, NULL }, /* a.out */ #endif #ifdef COMPAT_HPUX { HPUX_EXEC_HDR_SIZE, exec_hpux_makecmds, { NULL }, &emul_hpux, EXECSW_PRIO_ANY, - 0, copyargs, hpux_setregs }, /* HP-UX a.out */ + 0, copyargs, NULL }, /* HP-UX a.out */ #endif #ifdef COMPAT_M68K4K { sizeof(struct exec), exec_m68k4k_makecmds, { NULL }, &emul_netbsd, EXECSW_PRIO_ANY, - 0, copyargs, setregs }, /* m68k4k a.out */ + 0, copyargs, NULL }, /* m68k4k a.out */ #endif #ifdef COMPAT_VAX1K { sizeof(struct exec), exec_vax1k_makecmds, { NULL }, &emul_netbsd, EXECSW_PRIO_ANY, - 0, copyargs, setregs }, /* vax1k a.out */ + 0, copyargs, NULL }, /* vax1k a.out */ #endif #ifdef COMPAT_PECOFF { sizeof(struct exec), exec_pecoff_makecmds, { NULL }, &emul_netbsd, EXECSW_PRIO_ANY, /* XXX emul_pecoff once it's different */ howmany(sizeof(struct pecoff_args), sizeof(char *)), - pecoff_copyargs, setregs }, /* Win32/CE PE/COFF */ + pecoff_copyargs, NULL }, /* Win32/CE PE/COFF */ #endif }; int nexecs_builtin = (sizeof(execsw_builtin) / sizeof(struct execsw)); diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 2e87843ed39..2dc5c755198 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exec.c,v 1.144 2001/07/29 21:22:42 christos Exp $ */ +/* $NetBSD: kern_exec.c,v 1.145 2001/09/18 19:36:33 jdolecek Exp $ */ /*- * Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou @@ -140,6 +140,7 @@ const struct emul emul_netbsd = { trapsignal, sigcode, esigcode, + setregs, NULL, NULL, NULL, @@ -639,7 +640,9 @@ sys_execve(struct proc *p, void *v, register_t *retval) vput(pack.ep_vp); /* setup new registers and do misc. setup. */ - (*pack.ep_es->es_setregs)(p, &pack, (u_long) stack); + (*pack.ep_es->es_emul->e_setregs)(p, &pack, (u_long) stack); + if (pack.ep_es->es_setregs) + (*pack.ep_es->es_setregs)(p, &pack, (u_long) stack); if (p->p_flag & P_TRACED) psignal(p, SIGTRAP); diff --git a/sys/lkm/compat/aout/lkminit_emul.c b/sys/lkm/compat/aout/lkminit_emul.c index 2c892697210..23c6b0a3aef 100644 --- a/sys/lkm/compat/aout/lkminit_emul.c +++ b/sys/lkm/compat/aout/lkminit_emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_emul.c,v 1.2 2000/12/13 11:18:37 enami Exp $ */ +/* $NetBSD: lkminit_emul.c,v 1.3 2001/09/18 19:36:34 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ static struct execsw exec_netbsd_aout = { sizeof(struct exec), exec_aout_makecmds, { NULL }, &emul_netbsd_aout, EXECSW_PRIO_FIRST, /* Note: this differs from exec_conf.c entry */ - 0, copyargs, setregs }; /* a.out binaries */ + 0, copyargs }; /* a.out binaries */ /* * declare the executable format diff --git a/sys/lkm/compat/aoutm68k/lkminit_emul.c b/sys/lkm/compat/aoutm68k/lkminit_emul.c index e1157112274..75f6ee361c9 100644 --- a/sys/lkm/compat/aoutm68k/lkminit_emul.c +++ b/sys/lkm/compat/aoutm68k/lkminit_emul.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_emul.c,v 1.2 2000/12/13 11:18:38 enami Exp $ */ +/* $NetBSD: lkminit_emul.c,v 1.3 2001/09/18 19:36:35 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ static struct execsw exec_netbsd_aoutm68k = { sizeof(struct exec), exec_aout_makecmds, { NULL }, &emul_netbsd_aoutm68k, EXECSW_PRIO_FIRST, /* Note: this differs from exec_conf.c entry */ - 0, copyargs, setregs }; /* a.out binaries */ + 0, copyargs }; /* a.out binaries */ /* * declare the executable format diff --git a/sys/lkm/exec/elf/lkminit_exec.c b/sys/lkm/exec/elf/lkminit_exec.c index 4042f97c47c..70a47595feb 100644 --- a/sys/lkm/exec/elf/lkminit_exec.c +++ b/sys/lkm/exec/elf/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2001/06/06 20:45:59 mrg Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:35 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ static struct execsw exec_elf = { netbsd_elf32_probe }, &emul_netbsd, EXECSW_PRIO_ANY, howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - elf32_copyargs, setregs }; /* NetBSD 32bit ELF bins */ + elf32_copyargs }; /* NetBSD 32bit ELF bins */ /* * declare the exec diff --git a/sys/lkm/exec/freebsd_aout/lkminit_exec.c b/sys/lkm/exec/freebsd_aout/lkminit_exec.c index 7923213d9c1..2f86d64bc6f 100644 --- a/sys/lkm/exec/freebsd_aout/lkminit_exec.c +++ b/sys/lkm/exec/freebsd_aout/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:35 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:35 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ int exec_freebsd_aout_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_freebsd_aout = { FREEBSD_AOUT_HDR_SIZE, exec_freebsd_aout_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - 0, copyargs, freebsd_setregs }; /* a.out */ + 0, copyargs }; /* a.out */ /* diff --git a/sys/lkm/exec/freebsd_elf/lkminit_exec.c b/sys/lkm/exec/freebsd_elf/lkminit_exec.c index ecc59c4f70b..df177f79f11 100644 --- a/sys/lkm/exec/freebsd_elf/lkminit_exec.c +++ b/sys/lkm/exec/freebsd_elf/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.3 2001/05/15 02:00:13 lukem Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.4 2001/09/18 19:36:35 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ static struct execsw exec_freebsd_elf = { ELFNAME2(freebsd,probe) }, NULL, EXECSW_PRIO_ANY, FREEBSD_ELF_AUX_ARGSIZ, - elf32_copyargs, freebsd_setregs }; /* FreeBSD 32bit ELF bins (not 64bit safe )*/ + elf32_copyargs }; /* FreeBSD 32bit ELF bins (not 64bit safe )*/ /* diff --git a/sys/lkm/exec/hpux_aout/lkminit_exec.c b/sys/lkm/exec/hpux_aout/lkminit_exec.c index 1876ad73e34..1d955b0ba92 100644 --- a/sys/lkm/exec/hpux_aout/lkminit_exec.c +++ b/sys/lkm/exec/hpux_aout/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:36 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:35 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ int exec_hpux_aout_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_hpux_aout = { HPUX_EXEC_HDR_SIZE, exec_hpux_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - 0, copyargs, hpux_setregs }; /* HP-UX a.out */ + 0, copyargs }; /* HP-UX a.out */ /* * declare the exec diff --git a/sys/lkm/exec/ibcs2_coff/lkminit_exec.c b/sys/lkm/exec/ibcs2_coff/lkminit_exec.c index aa98873d3ea..cc7e19cd0d4 100644 --- a/sys/lkm/exec/ibcs2_coff/lkminit_exec.c +++ b/sys/lkm/exec/ibcs2_coff/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:37 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:36 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ int exec_ibcs2_coff_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_ibcs2_coff = { COFF_HDR_SIZE, exec_ibcs2_coff_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - 0, copyargs, ibcs2_setregs }; /* coff binaries */ + 0, copyargs }; /* coff binaries */ /* * declare the exec diff --git a/sys/lkm/exec/ibcs2_elf/lkminit_exec.c b/sys/lkm/exec/ibcs2_elf/lkminit_exec.c index b5c1e40b374..638d3c259ac 100644 --- a/sys/lkm/exec/ibcs2_elf/lkminit_exec.c +++ b/sys/lkm/exec/ibcs2_elf/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.2 2001/05/15 02:00:13 lukem Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.3 2001/09/18 19:36:36 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ static struct execsw exec_ibcs2_elf = { sizeof (Elf32_Ehdr), exec_elf32_makecmds, { ELFNAME2(ibcs2,probe) }, &emul_ibcs2, EXECSW_PRIO_ANY, - IBCS2_ELF_AUX_ARGSIZ, elf32_copyargs, setregs }; + IBCS2_ELF_AUX_ARGSIZ, elf32_copyargs }; /* SCO 32bit ELF bins (not 64bit safe) */ /* diff --git a/sys/lkm/exec/ibcs2_xout/lkminit_exec.c b/sys/lkm/exec/ibcs2_xout/lkminit_exec.c index 882cf7f08a0..324cd713a39 100644 --- a/sys/lkm/exec/ibcs2_xout/lkminit_exec.c +++ b/sys/lkm/exec/ibcs2_xout/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:39 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:36 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ int exec_ibcs2_xout_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_ibcs2_xout = { XOUT_HDR_SIZE, exec_ibcs2_xout_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - 0, copyargs, ibcs2_setregs }; /* x.out binaries */ + 0, copyargs }; /* x.out binaries */ /* * declare the exec diff --git a/sys/lkm/exec/linux_aout/lkminit_exec.c b/sys/lkm/exec/linux_aout/lkminit_exec.c index 4d2127f7135..6deeaa215d5 100644 --- a/sys/lkm/exec/linux_aout/lkminit_exec.c +++ b/sys/lkm/exec/linux_aout/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:40 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:36 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ int exec_linux_aout_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_linux_aout = { LINUX_AOUT_HDR_SIZE, exec_linux_aout_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - LINUX_AOUT_AUX_ARGSIZ, linux_aout_copyargs, linux_setregs }; /* linux a.out */ + LINUX_AOUT_AUX_ARGSIZ, linux_aout_copyargs }; /* linux a.out */ /* * declare the exec diff --git a/sys/lkm/exec/linux_elf/lkminit_exec.c b/sys/lkm/exec/linux_elf/lkminit_exec.c index 71878c6d913..78d63c28044 100644 --- a/sys/lkm/exec/linux_elf/lkminit_exec.c +++ b/sys/lkm/exec/linux_elf/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.2 2001/05/15 02:00:13 lukem Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.3 2001/09/18 19:36:36 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ static struct execsw exec_linux_elf = NULL, /* will be set by exec_add() */ EXECSW_PRIO_ANY, LINUX_ELF_AUX_ARGSIZ, - LINUX_COPYARGS_FUNCTION, setregs }; /* Linux 32bit ELF bins */ + LINUX_COPYARGS_FUNCTION };/* Linux 32bit ELF bins */ /* * declare the exec diff --git a/sys/lkm/exec/m68k4k/lkminit_exec.c b/sys/lkm/exec/m68k4k/lkminit_exec.c index 5b5ba8366c2..77e15ae39c3 100644 --- a/sys/lkm/exec/m68k4k/lkminit_exec.c +++ b/sys/lkm/exec/m68k4k/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:42 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:37 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ int exec_m68k4k_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_m68k4k = { sizeof(struct exec), exec_m68k4k_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - 0, copyargs, setregs }; /* m68k4k a.out */ + 0, copyargs }; /* m68k4k a.out */ /* * declare the exec diff --git a/sys/lkm/exec/netbsd32_aout/lkminit_exec.c b/sys/lkm/exec/netbsd32_aout/lkminit_exec.c index f8b0f6192db..24d16b01719 100644 --- a/sys/lkm/exec/netbsd32_aout/lkminit_exec.c +++ b/sys/lkm/exec/netbsd32_aout/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:43 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:37 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ int exec_netbsd32_aout_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_netbsd32_aout = { sizeof(struct netbsd32_exec), exec_netbsd32_makecmds, { NULL }, NULL, EXECSW_PRIO_FIRST, - 0, netbsd32_copyargs, netbsd32_setregs }; /* sparc 32 bit */ + 0, netbsd32_copyargs }; /* sparc 32 bit */ /* * declare the exec diff --git a/sys/lkm/exec/netbsd32_elf/lkminit_exec.c b/sys/lkm/exec/netbsd32_elf/lkminit_exec.c index 5d4acd5e70b..2f580cd70ec 100644 --- a/sys/lkm/exec/netbsd32_elf/lkminit_exec.c +++ b/sys/lkm/exec/netbsd32_elf/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.2 2001/05/15 02:00:14 lukem Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.3 2001/09/18 19:36:37 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ static struct execsw exec_netbsd32_elf = { ELFNAME2(netbsd32,probe) }, NULL, EXECSW_PRIO_FIRST, howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)), - netbsd32_elf32_copyargs, netbsd32_setregs }; /* NetBSD32 32bit ELF bins */ + netbsd32_elf32_copyargs }; /* NetBSD32 32bit ELF bins */ /* * declare the exec diff --git a/sys/lkm/exec/sunos32_aout/lkminit_exec.c b/sys/lkm/exec/sunos32_aout/lkminit_exec.c index 123f89c9ead..634ccae1d0e 100644 --- a/sys/lkm/exec/sunos32_aout/lkminit_exec.c +++ b/sys/lkm/exec/sunos32_aout/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2001/02/07 13:35:39 mrg Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:37 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ int exec_sunos32_aout_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_sunos32_aout = { SUNOS32_AOUT_HDR_SIZE, exec_sunos32_aout_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - 0, netbsd32_copyargs, netbsd32_setregs }; /* SunOS a.out, 64-bit kernel */ + 0, netbsd32_copyargs }; /* SunOS a.out, 64-bit kernel */ /* * declare the exec diff --git a/sys/lkm/exec/sunos_aout/lkminit_exec.c b/sys/lkm/exec/sunos_aout/lkminit_exec.c index c6abf55052a..9ee3b3030e0 100644 --- a/sys/lkm/exec/sunos_aout/lkminit_exec.c +++ b/sys/lkm/exec/sunos_aout/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:46 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:37 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ int exec_sunos_aout_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_sunos_aout = { SUNOS_AOUT_HDR_SIZE, exec_sunos_aout_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - 0, copyargs, setregs }; /* SunOS a.out */ + 0, copyargs }; /* SunOS a.out */ /* * declare the exec diff --git a/sys/lkm/exec/svr4_32_elf/lkminit_exec.c b/sys/lkm/exec/svr4_32_elf/lkminit_exec.c index 4b407b5c08d..bae43385ba0 100644 --- a/sys/lkm/exec/svr4_32_elf/lkminit_exec.c +++ b/sys/lkm/exec/svr4_32_elf/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2001/06/05 14:49:00 mrg Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:38 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ static struct execsw exec_svr4_32_elf = { ELFNAME2(svr4_32,probe) }, NULL, EXECSW_PRIO_ANY, SVR4_32_AUX_ARGSIZ, - svr4_32_copyargs, svr4_32_setregs }; /* SVR4_32 32bit ELF bins (not 64bit safe) */ + svr4_32_copyargs }; /* SVR4_32 32bit ELF bins (not 64bit safe) */ /* * declare the exec diff --git a/sys/lkm/exec/svr4_elf/lkminit_exec.c b/sys/lkm/exec/svr4_elf/lkminit_exec.c index 106aebc8052..517031d0202 100644 --- a/sys/lkm/exec/svr4_elf/lkminit_exec.c +++ b/sys/lkm/exec/svr4_elf/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.3 2001/07/18 16:53:34 mrg Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.4 2001/09/18 19:36:38 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -59,13 +59,13 @@ static struct execsw exec_svr4_elf = { ELFNAME2(svr4,probe) }, NULL, EXECSW_PRIO_ANY, SVR4_AUX_ARGSIZ, - svr4_copyargs, svr4_setregs }; /* SVR4 32bit ELF bins (not 64bit safe) */ + svr4_copyargs }; /* SVR4 32bit ELF bins (not 64bit safe) */ #else { sizeof (Elf64_Ehdr), exec_elf64_makecmds, { ELFNAME2(svr4,probe) }, NULL, EXECSW_PRIO_ANY, SVR4_AUX_ARGSIZ64, - svr4_copyargs64, svr4_setregs }; /* SVR4 64bit ELF bins (not 64bit safe) */ + svr4_copyargs64 }; /* SVR4 64bit ELF bins (not 64bit safe) */ #endif /* diff --git a/sys/lkm/exec/vax1k/lkminit_exec.c b/sys/lkm/exec/vax1k/lkminit_exec.c index 73d96aac94c..b31d39c6764 100644 --- a/sys/lkm/exec/vax1k/lkminit_exec.c +++ b/sys/lkm/exec/vax1k/lkminit_exec.c @@ -1,4 +1,4 @@ -/* $NetBSD: lkminit_exec.c,v 1.1 2000/12/08 23:05:49 jdolecek Exp $ */ +/* $NetBSD: lkminit_exec.c,v 1.2 2001/09/18 19:36:38 jdolecek Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ int exec_vax1k_lkmentry __P((struct lkm_table *, int, int)); static struct execsw exec_vax1k = { sizeof(struct exec), exec_vax1k_makecmds, { NULL }, NULL, EXECSW_PRIO_ANY, - 0, copyargs, setregs }; /* vax1k a.out */ + 0, copyargs }; /* vax1k a.out */ /* * declare the exec diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 247042bbf31..f47b206fc35 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1,4 +1,4 @@ -/* $NetBSD: proc.h,v 1.133 2001/06/18 02:00:55 christos Exp $ */ +/* $NetBSD: proc.h,v 1.134 2001/09/18 19:36:32 jdolecek Exp $ */ /*- * Copyright (c) 1986, 1989, 1991, 1993 @@ -105,6 +105,9 @@ struct emul { void (*e_trapsignal) __P((struct proc *, int, u_long)); char *e_sigcode; /* Start of sigcode */ char *e_esigcode; /* End of sigcode */ + /* Set registers before execution */ + void (*e_setregs) __P((struct proc *, struct exec_package *, + u_long)); /* Per-process hooks */ void (*e_proc_exec) __P((struct proc *, |
