Module Name: src
Committed By: rin
Date: Tue Nov 10 21:40:07 UTC 2020
Modified Files:
src/sys/arch/arm/arm: cpu_exec.c
Log Message:
Test (epp->ep_esch->es_emul != &emul_netbsd) instead of
(epp->ep_esch->es_emul == &emul_netbsd32) to determine whether curlwp is
running on COMPAT_NETBSD32 or not.
The former is possible even if COMPAT_NETBSD32 is not built in the main
kernel. Now, compat_netbsd32 module can work on !COMPAT_NETBSD32 kernel.
Discussed with pgoyette.
XXX
Apply similar fixes, i.e., drop ``#ifdef COMPAT_NETBSD32'' conditional
codes from the rest parts of MD codes for aarch64 and mips64.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/arm/cpu_exec.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/arm/cpu_exec.c
diff -u src/sys/arch/arm/arm/cpu_exec.c:1.10 src/sys/arch/arm/arm/cpu_exec.c:1.11
--- src/sys/arch/arm/arm/cpu_exec.c:1.10 Mon Apr 27 06:54:12 2015
+++ src/sys/arch/arm/arm/cpu_exec.c Tue Nov 10 21:40:07 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_exec.c,v 1.10 2015/04/27 06:54:12 skrll Exp $ */
+/* $NetBSD: cpu_exec.c,v 1.11 2020/11/10 21:40:07 rin Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,10 +30,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.10 2015/04/27 06:54:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v 1.11 2020/11/10 21:40:07 rin Exp $");
#include "opt_compat_netbsd.h"
-#include "opt_compat_netbsd32.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,10 +44,6 @@ __KERNEL_RCSID(0, "$NetBSD: cpu_exec.c,v
#include <compat/common/compat_util.h>
#include <sys/exec_elf.h> /* mandatory */
-#ifdef COMPAT_NETBSD32
-#include <compat/netbsd32/netbsd32_exec.h>
-#endif
-
#include <arm/locore.h>
#if EXEC_ELF32
@@ -60,11 +55,7 @@ arm_netbsd_elf32_probe(struct lwp *l, st
const Elf_Ehdr * const eh = eh0;
const bool elf_aapcs_p =
(eh->e_flags & EF_ARM_EABIMASK) >= EF_ARM_EABI_VER4;
-#ifdef COMPAT_NETBSD32
- const bool netbsd32_p = (epp->ep_esch->es_emul == &emul_netbsd32);
-#else
- const bool netbsd32_p = false;
-#endif
+ const bool netbsd32_p = (epp->ep_esch->es_emul != &emul_netbsd);
#ifdef __ARM_EABI__
const bool aapcs_p = true;
#else