Source-Changes-HG archive

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

[src/trunk]: src/sys/lkm Update for "coredumps now exec-format/emulation spec...



details:   https://anonhg.NetBSD.org/src/rev/53424918e32e
branches:  trunk
changeset: 518922:53424918e32e
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Dec 08 00:37:07 2001 +0000

description:
Update for "coredumps now exec-format/emulation specific".

diffstat:

 sys/lkm/compat/aout/lkminit_emul.c        |  15 +++++++++++----
 sys/lkm/compat/aoutm68k/lkminit_emul.c    |  15 +++++++++++----
 sys/lkm/exec/aout/lkminit_exec.c          |  18 +++++++++++++-----
 sys/lkm/exec/elf/lkminit_exec.c           |  16 +++++++++++-----
 sys/lkm/exec/freebsd_aout/lkminit_exec.c  |  18 +++++++++++++-----
 sys/lkm/exec/freebsd_elf/lkminit_exec.c   |  16 +++++++++++-----
 sys/lkm/exec/hpux_aout/lkminit_exec.c     |  18 +++++++++++++-----
 sys/lkm/exec/ibcs2_coff/lkminit_exec.c    |  18 +++++++++++++-----
 sys/lkm/exec/ibcs2_elf/lkminit_exec.c     |  18 ++++++++++++------
 sys/lkm/exec/ibcs2_xout/lkminit_exec.c    |  18 +++++++++++++-----
 sys/lkm/exec/linux_aout/lkminit_exec.c    |  18 +++++++++++++-----
 sys/lkm/exec/linux_elf/lkminit_exec.c     |  13 +++++++++----
 sys/lkm/exec/m68k4k/lkminit_exec.c        |  18 +++++++++++++-----
 sys/lkm/exec/netbsd32_aout/lkminit_exec.c |  18 +++++++++++++-----
 sys/lkm/exec/netbsd32_elf/lkminit_exec.c  |  16 +++++++++++-----
 sys/lkm/exec/osf1_ecoff/lkminit_exec.c    |  17 ++++++++++++-----
 sys/lkm/exec/sunos32_aout/lkminit_exec.c  |  18 +++++++++++++-----
 sys/lkm/exec/sunos_aout/lkminit_exec.c    |  18 +++++++++++++-----
 sys/lkm/exec/svr4_32_elf/lkminit_exec.c   |  16 +++++++++++-----
 sys/lkm/exec/svr4_elf/lkminit_exec.c      |  24 +++++++++++++++++-------
 sys/lkm/exec/ultrix_ecoff/lkminit_exec.c  |  17 ++++++++++++-----
 sys/lkm/exec/vax1k/lkminit_exec.c         |  18 +++++++++++++-----
 22 files changed, 271 insertions(+), 110 deletions(-)

diffs (truncated from 1016 to 300 lines):

diff -r 0b8bf70283eb -r 53424918e32e sys/lkm/compat/aout/lkminit_emul.c
--- a/sys/lkm/compat/aout/lkminit_emul.c        Sat Dec 08 00:35:25 2001 +0000
+++ b/sys/lkm/compat/aout/lkminit_emul.c        Sat Dec 08 00:37:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_emul.c,v 1.4 2001/11/12 23:22:59 lukem Exp $ */
+/* $NetBSD: lkminit_emul.c,v 1.5 2001/12/08 00:37:07 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.4 2001/11/12 23:22:59 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.5 2001/12/08 00:37:07 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -50,6 +50,7 @@
 #include <sys/file.h>
 #include <sys/errno.h>
 #include <sys/proc.h>
+#include <sys/signalvar.h>
 
 /*
  * This module is different to other compat modules - it adds the
@@ -63,10 +64,16 @@
 int compat_aout_lkmentry __P((struct lkm_table *, int, int));
 
 static struct execsw exec_netbsd_aout =
-       { sizeof(struct exec), exec_aout_makecmds, { NULL },
+       /* Native a.out */
+       { sizeof(struct exec),
+         exec_aout_makecmds,
+         { NULL },
          &emul_netbsd_aout,
          EXECSW_PRIO_FIRST,    /* Note: this differs from exec_conf.c entry */
-         0, copyargs };        /* a.out binaries */
+         0,
+         copyargs,
+         NULL,
+         coredump_netbsd };
 
 /*
  * declare the executable format
diff -r 0b8bf70283eb -r 53424918e32e sys/lkm/compat/aoutm68k/lkminit_emul.c
--- a/sys/lkm/compat/aoutm68k/lkminit_emul.c    Sat Dec 08 00:35:25 2001 +0000
+++ b/sys/lkm/compat/aoutm68k/lkminit_emul.c    Sat Dec 08 00:37:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_emul.c,v 1.4 2001/11/12 23:23:01 lukem Exp $ */
+/* $NetBSD: lkminit_emul.c,v 1.5 2001/12/08 00:37:08 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.4 2001/11/12 23:23:01 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_emul.c,v 1.5 2001/12/08 00:37:08 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -50,6 +50,7 @@
 #include <sys/file.h>
 #include <sys/errno.h>
 #include <sys/proc.h>
+#include <sys/signalvar.h>
 
 /*
  * This module is different to other compat modules - it adds the
@@ -63,10 +64,16 @@
 int compat_aoutm68k_lkmentry __P((struct lkm_table *, int, int));
 
 static struct execsw exec_netbsd_aoutm68k =
-       { sizeof(struct exec), exec_aout_makecmds, { NULL },
+       /* Native a.out */
+       { sizeof(struct exec),
+         exec_aout_makecmds,
+         { NULL },
          &emul_netbsd_aoutm68k,
          EXECSW_PRIO_FIRST,    /* Note: this differs from exec_conf.c entry */
-         0, copyargs };        /* a.out binaries */
+         0,
+         copyargs,
+         NULL,
+         coredump_netbsd };
 
 /*
  * declare the executable format
diff -r 0b8bf70283eb -r 53424918e32e sys/lkm/exec/aout/lkminit_exec.c
--- a/sys/lkm/exec/aout/lkminit_exec.c  Sat Dec 08 00:35:25 2001 +0000
+++ b/sys/lkm/exec/aout/lkminit_exec.c  Sat Dec 08 00:37:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_exec.c,v 1.2 2001/11/12 23:23:07 lukem Exp $ */
+/* $NetBSD: lkminit_exec.c,v 1.3 2001/12/08 00:37:09 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.2 2001/11/12 23:23:07 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.3 2001/12/08 00:37:09 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -45,15 +45,23 @@
 #include <sys/exec.h>
 #include <sys/proc.h>
 #include <sys/lkm.h>
+#include <sys/signalvar.h>
 
 int exec_aout_lkmentry __P((struct lkm_table *, int, int));
 
 extern const struct emul emul_netbsd;  /* XXX */
 
 static struct execsw exec_aout =
-       { sizeof(struct exec), exec_aout_makecmds, { NULL },
-         &emul_netbsd, EXECSW_PRIO_ANY,
-         0, copyargs, setregs };       /* a.out binaries */
+       /* Native a.out */
+       { sizeof(struct exec),
+         exec_aout_makecmds,
+         { NULL },
+         &emul_netbsd,
+         EXECSW_PRIO_ANY,
+         0,
+         copyargs,
+         setregs,
+         coredump_netbsd };
 
 /*
  * declare the exec
diff -r 0b8bf70283eb -r 53424918e32e sys/lkm/exec/elf/lkminit_exec.c
--- a/sys/lkm/exec/elf/lkminit_exec.c   Sat Dec 08 00:35:25 2001 +0000
+++ b/sys/lkm/exec/elf/lkminit_exec.c   Sat Dec 08 00:37:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_exec.c,v 1.3 2001/11/12 23:23:08 lukem Exp $ */
+/* $NetBSD: lkminit_exec.c,v 1.4 2001/12/08 00:37:09 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.3 2001/11/12 23:23:08 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.4 2001/12/08 00:37:09 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -46,6 +46,7 @@
 #include <sys/proc.h>
 #include <sys/lkm.h>
 #include <sys/exec_elf.h>
+#include <sys/signalvar.h>
 
 int exec_elf_lkmentry __P((struct lkm_table *, int, int));
 
@@ -54,11 +55,16 @@
                                char *, vaddr_t *);
 
 static struct execsw exec_elf =
-       { sizeof (Elf32_Ehdr), exec_elf32_makecmds,
+       /* Native Elf32 */
+       { sizeof (Elf32_Ehdr),
+         exec_elf32_makecmds,
          { netbsd_elf32_probe },
-         &emul_netbsd, EXECSW_PRIO_ANY,
+         &emul_netbsd,
+         EXECSW_PRIO_ANY,
          howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
-         elf32_copyargs };     /* NetBSD 32bit ELF bins */
+         elf32_copyargs,
+         NULL,
+         coredump_netbsd };
 
 /*
  * declare the exec
diff -r 0b8bf70283eb -r 53424918e32e sys/lkm/exec/freebsd_aout/lkminit_exec.c
--- a/sys/lkm/exec/freebsd_aout/lkminit_exec.c  Sat Dec 08 00:35:25 2001 +0000
+++ b/sys/lkm/exec/freebsd_aout/lkminit_exec.c  Sat Dec 08 00:37:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_exec.c,v 1.3 2001/11/12 23:23:09 lukem Exp $ */
+/* $NetBSD: lkminit_exec.c,v 1.4 2001/12/08 00:37:09 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.3 2001/11/12 23:23:09 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.4 2001/12/08 00:37:09 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -47,15 +47,23 @@
 #include <sys/exec_elf.h>
 #include <sys/proc.h>
 #include <sys/lkm.h>
+#include <sys/signalvar.h>
 
 #include <compat/freebsd/freebsd_exec.h>
 
 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 };        /* a.out */
+       /* FreeBSD a.out (native word size) */
+       { FREEBSD_AOUT_HDR_SIZE,
+         exec_freebsd_aout_makecmds,
+         { NULL },
+         NULL,
+         EXECSW_PRIO_ANY,
+         0,
+         copyargs,
+         NULL,
+         coredump_netbsd };
 
 
 /*
diff -r 0b8bf70283eb -r 53424918e32e sys/lkm/exec/freebsd_elf/lkminit_exec.c
--- a/sys/lkm/exec/freebsd_elf/lkminit_exec.c   Sat Dec 08 00:35:25 2001 +0000
+++ b/sys/lkm/exec/freebsd_elf/lkminit_exec.c   Sat Dec 08 00:37:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_exec.c,v 1.5 2001/11/12 23:23:10 lukem Exp $ */
+/* $NetBSD: lkminit_exec.c,v 1.6 2001/12/08 00:37:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.5 2001/11/12 23:23:10 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.6 2001/12/08 00:37:10 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -45,6 +45,7 @@
 #include <sys/exec.h>
 #include <sys/proc.h>
 #include <sys/lkm.h>
+#include <sys/signalvar.h>
 
 #include <machine/elf_machdep.h>
 #define ELFSIZE        32
@@ -55,11 +56,16 @@
 int exec_freebsd_elf_lkmentry __P((struct lkm_table *, int, int));
 
 static struct execsw exec_freebsd_elf =
-       { sizeof (Elf32_Ehdr), exec_elf32_makecmds,
+       /* FreBSD Elf32 (probe not 64-bit safe) */
+       { sizeof (Elf32_Ehdr),
+         exec_elf32_makecmds,
          { ELFNAME2(freebsd,probe) },
-         NULL, EXECSW_PRIO_ANY,
+         NULL,
+         EXECSW_PRIO_ANY,
          FREEBSD_ELF_AUX_ARGSIZ,
-         elf32_copyargs };     /* FreeBSD 32bit ELF bins (not 64bit safe )*/
+         elf32_copyargs,
+         NULL,
+         coredump_netbsd };
 
 
 /*
diff -r 0b8bf70283eb -r 53424918e32e sys/lkm/exec/hpux_aout/lkminit_exec.c
--- a/sys/lkm/exec/hpux_aout/lkminit_exec.c     Sat Dec 08 00:35:25 2001 +0000
+++ b/sys/lkm/exec/hpux_aout/lkminit_exec.c     Sat Dec 08 00:37:07 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lkminit_exec.c,v 1.3 2001/11/12 23:23:11 lukem Exp $ */
+/* $NetBSD: lkminit_exec.c,v 1.4 2001/12/08 00:37:10 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.3 2001/11/12 23:23:11 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lkminit_exec.c,v 1.4 2001/12/08 00:37:10 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -47,15 +47,23 @@
 #include <sys/exec_elf.h>
 #include <sys/proc.h>
 #include <sys/lkm.h>
+#include <sys/signalvar.h>
 
 #include <compat/hpux/hpux_exec.h>
 
 int exec_hpux_aout_lkmentry __P((struct lkm_table *, int, int));
 



Home | Main Index | Thread Index | Old Index