From b996670b127aa2bbace3bf72918329136b33fbf2 Mon Sep 17 00:00:00 2001 From: drahn Date: Fri, 23 Apr 2021 15:53:07 +0000 Subject: [PATCH] Add MID_RISCV64 and EM_RISCV to enable riscv64 ok deraadt@ --- sys/sys/exec.h | 3 ++- sys/sys/exec_elf.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/sys/exec.h b/sys/sys/exec.h index a726202ebc6..f6685ec55e6 100644 --- a/sys/sys/exec.h +++ b/sys/sys/exec.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec.h,v 1.43 2021/03/21 11:29:38 semarie Exp $ */ +/* $OpenBSD: exec.h,v 1.44 2021/04/23 15:53:07 drahn Exp $ */ /* $NetBSD: exec.h,v 1.59 1996/02/09 18:25:09 christos Exp $ */ /*- @@ -289,6 +289,7 @@ struct exec { #define MID_MIPS64 158 /* big-endian MIPS64 */ #define MID_ARM64 159 /* ARM64 */ #define MID_POWERPC64 160 /* big-endian 64-bit PowerPC */ +#define MID_RISCV64 161 /* Little-endian 64-bit RISC-V */ #define MID_HP200 200 /* hp200 (68010) BSD binary */ #define MID_HP300 300 /* hp300 (68020+68881) BSD binary */ #define MID_HPUX 0x20C /* hp200/300 HP-UX binary */ diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h index 86a2543c5ba..3f5034c4962 100644 --- a/sys/sys/exec_elf.h +++ b/sys/sys/exec_elf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.h,v 1.89 2021/03/10 10:21:47 jsg Exp $ */ +/* $OpenBSD: exec_elf.h,v 1.90 2021/04/23 15:53:07 drahn Exp $ */ /* * Copyright (c) 1995, 1996 Erik Theisen. All rights reserved. * @@ -191,6 +191,7 @@ typedef struct { #define EM_X86_64 EM_AMD64 #define EM_VAX 75 /* DEC VAX */ #define EM_AARCH64 183 /* ARM 64-bit architecture (AArch64) */ +#define EM_RISCV 243 /* RISC-V */ /* Non-standard */ #define EM_ALPHA_EXP 0x9026 /* DEC ALPHA */ -- 2.20.1