diff options
author | emaste <emaste@FreeBSD.org> | 2015-07-24 16:52:21 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-07-24 16:52:21 +0000 |
commit | faf3fc6a75d0302eb7cfbbb6e3d57da093c7c019 (patch) | |
tree | 694fbd536e2979fe224c48e88772d6159d5d9d4b /contrib/elftoolchain | |
parent | 9c81c0faa6c5dc734629a600c5f7273a97c40915 (diff) | |
download | FreeBSD-src-faf3fc6a75d0302eb7cfbbb6e3d57da093c7c019.zip FreeBSD-src-faf3fc6a75d0302eb7cfbbb6e3d57da093c7c019.tar.gz |
Add RISC-V ELF machine type definition
EM_RISCV is now officially registered as e_machine 243.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'contrib/elftoolchain')
-rw-r--r-- | contrib/elftoolchain/common/elfdefinitions.h | 3 | ||||
-rw-r--r-- | contrib/elftoolchain/readelf/readelf.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/contrib/elftoolchain/common/elfdefinitions.h b/contrib/elftoolchain/common/elfdefinitions.h index 58554fef..21b415b 100644 --- a/contrib/elftoolchain/common/elfdefinitions.h +++ b/contrib/elftoolchain/common/elfdefinitions.h @@ -813,7 +813,8 @@ _ELF_DEFINE_EM(EM_KM32, 210, "KM211 KM32 32-bit processor") \ _ELF_DEFINE_EM(EM_KMX32, 211, "KM211 KMX32 32-bit processor") \ _ELF_DEFINE_EM(EM_KMX16, 212, "KM211 KMX16 16-bit processor") \ _ELF_DEFINE_EM(EM_KMX8, 213, "KM211 KMX8 8-bit processor") \ -_ELF_DEFINE_EM(EM_KVARC, 214, "KM211 KMX32 KVARC processor") +_ELF_DEFINE_EM(EM_KVARC, 214, "KM211 KMX32 KVARC processor") \ +_ELF_DEFINE_EM(EM_RISCV, 243, "RISC-V") #undef _ELF_DEFINE_EM #define _ELF_DEFINE_EM(N, V, DESCR) N = V , diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index b1b81a3..f7f9e57 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -532,6 +532,7 @@ elf_machine(unsigned int mach) case EM_ARCA: return "Arca RISC Microprocessor"; case EM_UNICORE: return "Microprocessor series from PKU-Unity Ltd"; case EM_AARCH64: return "AArch64"; + case EM_RISCV: return "RISC-V"; default: snprintf(s_mach, sizeof(s_mach), "<unknown: %#x>", mach); return (s_mach); |