Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Make the setregs hook emulation-specific, rather than ex...



details:   https://anonhg.NetBSD.org/src/rev/415f94585043
branches:  trunk
changeset: 515186:415f94585043
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Sep 18 19:36:32 2001 +0000

description:
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:

 sys/arch/alpha/alpha/machdep.c            |   5 +-
 sys/arch/mips/mips/cpu_exec.c             |   3 +-
 sys/compat/aout/aout_exec.c               |   3 +-
 sys/compat/aoutm68k/aoutm68k_exec.c       |   3 +-
 sys/compat/freebsd/freebsd_exec.c         |   3 +-
 sys/compat/hpux/hpux_exec.c               |   3 +-
 sys/compat/ibcs2/ibcs2_exec.c             |   3 +-
 sys/compat/linux/common/linux_exec.c      |   3 +-
 sys/compat/mach/mach_exec.c               |   3 +-
 sys/compat/netbsd32/netbsd32_netbsd.c     |   3 +-
 sys/compat/osf1/osf1_exec.c               |   3 +-
 sys/compat/sunos/sunos_exec.c             |   4 +-
 sys/compat/sunos32/sunos32_exec.c         |   3 +-
 sys/compat/svr4/svr4_exec.c               |   4 +-
 sys/compat/svr4_32/svr4_32_exec.c         |   3 +-
 sys/compat/ultrix/ultrix_misc.c           |   3 +-
 sys/kern/exec_conf.c                      |  54 +++++++++++++++---------------
 sys/kern/kern_exec.c                      |   7 ++-
 sys/lkm/compat/aout/lkminit_emul.c        |   4 +-
 sys/lkm/compat/aoutm68k/lkminit_emul.c    |   4 +-
 sys/lkm/exec/elf/lkminit_exec.c           |   4 +-
 sys/lkm/exec/freebsd_aout/lkminit_exec.c  |   4 +-
 sys/lkm/exec/freebsd_elf/lkminit_exec.c   |   4 +-
 sys/lkm/exec/hpux_aout/lkminit_exec.c     |   4 +-
 sys/lkm/exec/ibcs2_coff/lkminit_exec.c    |   4 +-
 sys/lkm/exec/ibcs2_elf/lkminit_exec.c     |   4 +-
 sys/lkm/exec/ibcs2_xout/lkminit_exec.c    |   4 +-
 sys/lkm/exec/linux_aout/lkminit_exec.c    |   4 +-
 sys/lkm/exec/linux_elf/lkminit_exec.c     |   4 +-
 sys/lkm/exec/m68k4k/lkminit_exec.c        |   4 +-
 sys/lkm/exec/netbsd32_aout/lkminit_exec.c |   4 +-
 sys/lkm/exec/netbsd32_elf/lkminit_exec.c  |   4 +-
 sys/lkm/exec/sunos32_aout/lkminit_exec.c  |   4 +-
 sys/lkm/exec/sunos_aout/lkminit_exec.c    |   4 +-
 sys/lkm/exec/svr4_32_elf/lkminit_exec.c   |   4 +-
 sys/lkm/exec/svr4_elf/lkminit_exec.c      |   6 +-
 sys/lkm/exec/vax1k/lkminit_exec.c         |   4 +-
 sys/sys/proc.h                            |   5 ++-
 38 files changed, 108 insertions(+), 88 deletions(-)

diffs (truncated from 889 to 300 lines):

diff -r ac21c3fc2e80 -r 415f94585043 sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c    Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
 {
        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 -r ac21c3fc2e80 -r 415f94585043 sys/arch/mips/mips/cpu_exec.c
--- a/sys/arch/mips/mips/cpu_exec.c     Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/arch/mips/mips/cpu_exec.c     Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        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 -r ac21c3fc2e80 -r 415f94585043 sys/compat/aout/aout_exec.c
--- a/sys/compat/aout/aout_exec.c       Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/aout/aout_exec.c       Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        sigcode,
        esigcode,
+       setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/aoutm68k/aoutm68k_exec.c
--- a/sys/compat/aoutm68k/aoutm68k_exec.c       Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/aoutm68k/aoutm68k_exec.c       Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        sigcode,
        esigcode,
+       setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/freebsd/freebsd_exec.c
--- a/sys/compat/freebsd/freebsd_exec.c Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/freebsd/freebsd_exec.c Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        freebsd_sigcode,
        freebsd_esigcode,
+       freebsd_setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/hpux/hpux_exec.c
--- a/sys/compat/hpux/hpux_exec.c       Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/hpux/hpux_exec.c       Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        sigcode,
        esigcode,
+       hpux_setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/ibcs2/ibcs2_exec.c
--- a/sys/compat/ibcs2/ibcs2_exec.c     Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/ibcs2/ibcs2_exec.c     Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        ibcs2_sigcode,
        ibcs2_esigcode,
+       ibcs2_setregs,
        ibcs2_e_proc_exec,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/linux/common/linux_exec.c
--- a/sys/compat/linux/common/linux_exec.c      Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/linux/common/linux_exec.c      Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        linux_trapsignal,
        linux_sigcode,
        linux_esigcode,
+       linux_setregs,
        linux_e_proc_exec,
        linux_e_proc_fork,
        linux_e_proc_exit,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/mach/mach_exec.c
--- a/sys/compat/mach/mach_exec.c       Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/mach/mach_exec.c       Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        sigcode,
        esigcode,
+       setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/netbsd32/netbsd32_netbsd.c
--- a/sys/compat/netbsd32/netbsd32_netbsd.c     Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/netbsd32/netbsd32_netbsd.c     Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        netbsd32_sigcode,
        netbsd32_esigcode,
+       netbsd32_setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/osf1/osf1_exec.c
--- a/sys/compat/osf1/osf1_exec.c       Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/osf1/osf1_exec.c       Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        osf1_sigcode,
        osf1_esigcode,
+       setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/sunos/sunos_exec.c
--- a/sys/compat/sunos/sunos_exec.c     Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/sunos/sunos_exec.c     Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        sunos_sigcode,
        sunos_esigcode,
+       setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/sunos32/sunos32_exec.c
--- a/sys/compat/sunos32/sunos32_exec.c Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/sunos32/sunos32_exec.c Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        sunos_sigcode,
        sunos_esigcode,
+       netbsd32_setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/svr4/svr4_exec.c
--- a/sys/compat/svr4/svr4_exec.c       Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/svr4/svr4_exec.c       Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        svr4_sigcode,
        svr4_esigcode,
+       svr4_setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/svr4_32/svr4_32_exec.c
--- a/sys/compat/svr4_32/svr4_32_exec.c Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/svr4_32/svr4_32_exec.c Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        svr4_32_sigcode,
        svr4_32_esigcode,
+       svr4_32_setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/compat/ultrix/ultrix_misc.c
--- a/sys/compat/ultrix/ultrix_misc.c   Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/compat/ultrix/ultrix_misc.c   Tue Sep 18 19:36:32 2001 +0000
@@ -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 @@
        trapsignal,
        ultrix_sigcode,
        ultrix_esigcode,
+       setregs,
        NULL,
        NULL,
        NULL,
diff -r ac21c3fc2e80 -r 415f94585043 sys/kern/exec_conf.c
--- a/sys/kern/exec_conf.c      Tue Sep 18 18:46:39 2001 +0000
+++ b/sys/kern/exec_conf.c      Tue Sep 18 19:36:32 2001 +0000



Home | Main Index | Thread Index | Old Index