Source-Changes-HG archive

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

[src/trunk]: src/sys/compat/netbsd32 netbsd32 should depend on exec_elf32, si...



details:   https://anonhg.NetBSD.org/src/rev/199e170c6bc4
branches:  trunk
changeset: 330484:199e170c6bc4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Jul 11 16:22:49 2014 +0000

description:
netbsd32 should depend on exec_elf32, since it will use exec_elf32's functions.
This fixes
        # modload compat_netbsd32
when exec_elf32 is not loaded.

ok njoly@

diffstat:

 sys/compat/netbsd32/netbsd32_mod.c |  16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r 97d0df269f6c -r 199e170c6bc4 sys/compat/netbsd32/netbsd32_mod.c
--- a/sys/compat/netbsd32/netbsd32_mod.c        Fri Jul 11 16:17:29 2014 +0000
+++ b/sys/compat/netbsd32/netbsd32_mod.c        Fri Jul 11 16:22:49 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: netbsd32_mod.c,v 1.3 2014/03/07 01:33:43 christos Exp $        */
+/*     $NetBSD: netbsd32_mod.c,v 1.4 2014/07/11 16:22:49 maxv Exp $    */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,13 +30,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.3 2014/03/07 01:33:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_mod.c,v 1.4 2014/07/11 16:22:49 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_execfmt.h"
-#define        MODDEPS "compat"
+# define       DEPS1   "compat"
 #else
-#define        MODDEPS "compat,ksem"
+# define       DEPS1   "compat,ksem"
 #endif
 
 #ifndef ELFSIZE
@@ -51,10 +51,16 @@
 #include <compat/netbsd32/netbsd32_sysctl.h>
 #include <compat/netbsd32/netbsd32_exec.h>
 
+#if defined(EXEC_ELF32)
+# define       DEPS2   ",exec_elf32"
+#else
+# define       DEPS2   ""
+#endif
+
 #define ELF32_AUXSIZE (howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), \
     sizeof(Elf32_Addr)) + MAXPATHLEN + ALIGN(1))
 
-MODULE(MODULE_CLASS_EXEC, compat_netbsd32, MODDEPS);
+MODULE(MODULE_CLASS_EXEC, compat_netbsd32, DEPS1 DEPS2);
 
 static struct execsw netbsd32_execsw[] = {
 #ifdef EXEC_AOUT



Home | Main Index | Thread Index | Old Index