Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Native 32-bit and 32-bit emulation are mutually exc...
details: https://anonhg.NetBSD.org/src/rev/90519f65ba88
branches: trunk
changeset: 532063:90519f65ba88
user: eeh <eeh%NetBSD.org@localhost>
date: Fri May 31 00:52:20 2002 +0000
description:
Native 32-bit and 32-bit emulation are mutually exclusive. We should not
even try to execute 32-bit binaries as native on a 64-bit kernel.
diffstat:
sys/kern/exec_conf.c | 53 ++++++++++++++++++++++++++++++++++-----------------
1 files changed, 35 insertions(+), 18 deletions(-)
diffs (105 lines):
diff -r 5d42556cfee7 -r 90519f65ba88 sys/kern/exec_conf.c
--- a/sys/kern/exec_conf.c Fri May 31 00:49:42 2002 +0000
+++ b/sys/kern/exec_conf.c Fri May 31 00:52:20 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_conf.c,v 1.72 2002/04/02 23:56:17 rafal Exp $ */
+/* $NetBSD: exec_conf.c,v 1.73 2002/05/31 00:52:20 eeh Exp $ */
/*
* Copyright (c) 1993, 1994 Christopher G. Demetriou
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exec_conf.c,v 1.72 2002/04/02 23:56:17 rafal Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exec_conf.c,v 1.73 2002/05/31 00:52:20 eeh Exp $");
#include "opt_execfmt.h"
#include "opt_compat_freebsd.h"
@@ -203,7 +203,7 @@
netbsd32_copyargs,
NULL,
coredump_netbsd32 },
-#endif
+#else /* !COMPAT_NETBSD32 */
/* Native a.out */
{ sizeof(struct exec),
@@ -222,6 +222,7 @@
NULL,
coredump_netbsd },
#endif /* EXEC_AOUT */
+#endif /* !COMPAT_NETBSD32 */
#ifdef EXEC_COFF
/* Native COFF */
@@ -287,10 +288,39 @@
howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
netbsd32_elf32_copyargs,
NULL,
- coredump_netbsd32 }, /* XXX XXX XXX */
+ coredump_elf32 }, /* XXX XXX XXX */
+ /* This one should go first so it matches instead of native */
+
+#ifdef COMPAT_SVR4_32
+ /* SVR4 Elf32 on 64-bit */
+ { sizeof (Elf32_Ehdr),
+ exec_elf32_makecmds,
+ { ELF32NAME2(svr4_32,probe) },
+ &emul_svr4_32,
+ EXECSW_PRIO_ANY,
+ SVR4_32_AUX_ARGSIZ,
+ svr4_32_copyargs,
+ NULL,
+ coredump_elf32 }, /* XXX XXX XXX */
/* This one should go first so it matches instead of native */
#endif
+#if 0
+#if EXEC_ELF_NOTELESS
+ /* Generic compat Elf32 -- run as compat NetBSD Elf32 */
+ { sizeof (Elf32_Ehdr),
+ exec_elf32_makecmds,
+ { ELF32NAME2(netbsd32,probe_noteless) },
+ &emul_netbsd32,
+ EXECSW_PRIO_FIRST,
+ howmany(ELF_AUX_ENTRIES * sizeof(Aux32Info), sizeof (Elf32_Addr)),
+ netbsd32_elf32_copyargs,
+ NULL,
+ coredump_elf32 }, /* XXX XXX XXX */
+#endif
+#endif
+#else /* !COMPAT_NETBSD32 */
+
/* Native Elf32 */
{ sizeof (Elf32_Ehdr),
exec_elf32_makecmds,
@@ -352,20 +382,6 @@
coredump_elf32 },
#endif
-#ifdef COMPAT_SVR4_32
- /* SVR4 Elf32 on 64-bit */
- { sizeof (Elf32_Ehdr),
- exec_elf32_makecmds,
- { ELF32NAME2(svr4_32,probe) },
- &emul_svr4_32,
- EXECSW_PRIO_ANY,
- SVR4_32_AUX_ARGSIZ,
- svr4_32_copyargs,
- NULL,
- coredump_netbsd32 }, /* XXX XXX XXX */
- /* This one should go first so it matches instead of native */
-#endif
-
#ifdef COMPAT_SVR4
/* SVR4 Elf32 */
{ sizeof (Elf32_Ehdr),
@@ -405,6 +421,7 @@
coredump_elf32 },
#endif
#endif /* EXEC_ELF32 */
+#endif /* !COMPAT_NETBSD32 */
#ifdef EXEC_ELF64
/* Native Elf64 */
Home |
Main Index |
Thread Index |
Old Index