Source-Changes-HG archive

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

[src/trunk]: src/sys/kern only define hooks for 32 bit cores if we need them.



details:   https://anonhg.NetBSD.org/src/rev/60929ed81b91
branches:  trunk
changeset: 1015334:60929ed81b91
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Oct 20 13:47:30 2020 +0000

description:
only define hooks for 32 bit cores if we need them.

diffstat:

 sys/kern/kern_core.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (38 lines):

diff -r 8ca1fbe02d05 -r 60929ed81b91 sys/kern/kern_core.c
--- a/sys/kern/kern_core.c      Tue Oct 20 13:16:26 2020 +0000
+++ b/sys/kern/kern_core.c      Tue Oct 20 13:47:30 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_core.c,v 1.31 2020/10/19 19:33:02 christos Exp $  */
+/*     $NetBSD: kern_core.c,v 1.32 2020/10/20 13:47:30 christos Exp $  */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.31 2020/10/19 19:33:02 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_core.c,v 1.32 2020/10/20 13:47:30 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd32.h"
@@ -88,7 +88,9 @@
                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)
                MODULE_HOOK_SET(coredump_elf32_hook, real_coredump_elf32);
+#endif
 #ifdef _LP64
                MODULE_HOOK_SET(coredump_elf64_hook, real_coredump_elf64);
 #endif
@@ -103,7 +105,9 @@
 #ifdef _LP64
                MODULE_HOOK_UNSET(coredump_elf64_hook);
 #endif
+#if !defined(_LP64) || defined(COMPAT_NETBSD32)
                MODULE_HOOK_UNSET(coredump_elf32_hook);
+#endif
                MODULE_HOOK_UNSET(coredump_netbsd_hook);
                MODULE_HOOK_UNSET(coredump_offset_hook);
                MODULE_HOOK_UNSET(coredump_write_hook);



Home | Main Index | Thread Index | Old Index