Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/aarch64/aarch64 BE32 binaries are no longer support...
details: https://anonhg.NetBSD.org/src/rev/2792ad2bb164
branches: trunk
changeset: 1015086:2792ad2bb164
user: rin <rin%NetBSD.org@localhost>
date: Tue Oct 13 07:04:49 2020 +0000
description:
BE32 binaries are no longer supported for ARMv7 and later, and
therefore for aarch64eb.
Reject them with ENOEXEC, rather than causing illegal instruction
exceptions due to unexpected binary format.
diffstat:
sys/arch/aarch64/aarch64/exec_machdep.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 53c70b16039e -r 2792ad2bb164 sys/arch/aarch64/aarch64/exec_machdep.c
--- a/sys/arch/aarch64/aarch64/exec_machdep.c Tue Oct 13 06:58:57 2020 +0000
+++ b/sys/arch/aarch64/aarch64/exec_machdep.c Tue Oct 13 07:04:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_machdep.c,v 1.7 2020/05/23 18:08:59 ryo Exp $ */
+/* $NetBSD: exec_machdep.c,v 1.8 2020/10/13 07:04:49 rin Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_machdep.c,v 1.7 2020/05/23 18:08:59 ryo Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_machdep.c,v 1.8 2020/10/13 07:04:49 rin Exp $");
#include "opt_compat_netbsd.h"
#include "opt_compat_netbsd32.h"
@@ -77,6 +77,11 @@
/* OABI not support */
if (!elf_aapcs_p)
return ENOEXEC;
+#ifdef __AARCH64EB__
+ /* BE32 not support */
+ if ((eh->e_flags & EF_ARM_BE8) == 0)
+ return ENOEXEC;
+#endif
/*
* require aarch32 feature.
Home |
Main Index |
Thread Index |
Old Index