Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Depend directly on EXEC_ELF{32,64} to determine whi...
details: https://anonhg.NetBSD.org/src/rev/e277b14a0985
branches: trunk
changeset: 945340:e277b14a0985
user: christos <christos%NetBSD.org@localhost>
date: Mon Oct 26 17:35:39 2020 +0000
description:
Depend directly on EXEC_ELF{32,64} to determine which versions of the coredump
code are available.
diffstat:
sys/kern/kern_core.c | 13 +++++++------
sys/kern/kern_sig.c | 9 +++++----
2 files changed, 12 insertions(+), 10 deletions(-)
diffs (85 lines):
diff -r f585c81f0133 -r e277b14a0985 sys/kern/kern_core.c
--- a/sys/kern/kern_core.c Mon Oct 26 16:24:09 2020 +0000
+++ b/sys/kern/kern_core.c Mon Oct 26 17:35:39 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_core.c,v 1.32 2020/10/20 13:47:30 christos Exp $ */
+/* $NetBSD: kern_core.c,v 1.33 2020/10/26 17:35:39 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,9 +37,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.32 2020/10/20 13:47:30 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.33 2020/10/26 17:35:39 christos Exp $");
#ifdef _KERNEL_OPT
+#include "opt_execfmt.h"
#include "opt_compat_netbsd32.h"
#endif
@@ -88,10 +89,10 @@
MODULE_HOOK_SET(coredump_write_hook, coredump_write);
MODULE_HOOK_SET(coredump_offset_hook, coredump_offset);
MODULE_HOOK_SET(coredump_netbsd_hook, real_coredump_netbsd);
-#if !defined(_LP64) || defined(COMPAT_NETBSD32)
+#ifdef EXEC_ELF32
MODULE_HOOK_SET(coredump_elf32_hook, real_coredump_elf32);
#endif
-#ifdef _LP64
+#ifdef EXEC_ELF64
MODULE_HOOK_SET(coredump_elf64_hook, real_coredump_elf64);
#endif
MODULE_HOOK_SET(uvm_coredump_walkmap_hook,
@@ -102,10 +103,10 @@
case MODULE_CMD_FINI:
MODULE_HOOK_UNSET(uvm_coredump_count_segs_hook);
MODULE_HOOK_UNSET(uvm_coredump_walkmap_hook);
-#ifdef _LP64
+#ifdef EXEC_ELF64
MODULE_HOOK_UNSET(coredump_elf64_hook);
#endif
-#if !defined(_LP64) || defined(COMPAT_NETBSD32)
+#ifdef EXEC_ELF32
MODULE_HOOK_UNSET(coredump_elf32_hook);
#endif
MODULE_HOOK_UNSET(coredump_netbsd_hook);
diff -r f585c81f0133 -r e277b14a0985 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c Mon Oct 26 16:24:09 2020 +0000
+++ b/sys/kern/kern_sig.c Mon Oct 26 17:35:39 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.392 2020/10/20 13:16:26 christos Exp $ */
+/* $NetBSD: kern_sig.c,v 1.393 2020/10/26 17:35:39 christos Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008, 2019 The NetBSD Foundation, Inc.
@@ -70,8 +70,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.392 2020/10/20 13:16:26 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.393 2020/10/26 17:35:39 christos Exp $");
+#include "opt_execfmt.h"
#include "opt_ptrace.h"
#include "opt_dtrace.h"
#include "opt_compat_sunos.h"
@@ -2356,7 +2357,7 @@
return retval;
}
-#if !defined(_LP64) || defined(COMPAT_NETBSD32)
+#ifdef EXEC_ELF32
int
coredump_elf32(struct lwp *l, struct coredump_iostate *iocookie)
{
@@ -2367,7 +2368,7 @@
}
#endif
-#ifdef _LP64
+#ifdef EXEC_ELF64
int
coredump_elf64(struct lwp *l, struct coredump_iostate *iocookie)
{
Home |
Main Index |
Thread Index |
Old Index