summaryrefslogtreecommitdiffstats
path: root/contrib/elftoolchain
diff options
context:
space:
mode:
authorbr <br@FreeBSD.org>2016-01-24 15:12:49 +0000
committerbr <br@FreeBSD.org>2016-01-24 15:12:49 +0000
commitab3b7383d7d18bbb73149b81ac1e13d453cf05dc (patch)
treef9459a63550f0e80e2b2c1001624465d4282358b /contrib/elftoolchain
parente840a5e833ade5c78522949893fe36d51c48552c (diff)
downloadFreeBSD-src-ab3b7383d7d18bbb73149b81ac1e13d453cf05dc.zip
FreeBSD-src-ab3b7383d7d18bbb73149b81ac1e13d453cf05dc.tar.gz
Add config for RISC-V ISA.
Reviewed by: emaste Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D5046
Diffstat (limited to 'contrib/elftoolchain')
-rw-r--r--contrib/elftoolchain/libelf/_libelf_config.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/elftoolchain/libelf/_libelf_config.h b/contrib/elftoolchain/libelf/_libelf_config.h
index 1b8f35b..602eb89 100644
--- a/contrib/elftoolchain/libelf/_libelf_config.h
+++ b/contrib/elftoolchain/libelf/_libelf_config.h
@@ -97,6 +97,12 @@
#define LIBELF_BYTEORDER ELFDATA2MSB
#define LIBELF_CLASS ELFCLASS32
+#elif defined(__riscv64)
+
+#define LIBELF_ARCH EM_RISCV
+#define LIBELF_BYTEORDER ELFDATA2LSB
+#define LIBELF_CLASS ELFCLASS64
+
#elif defined(__sparc__)
#define LIBELF_ARCH EM_SPARCV9
OpenPOWER on IntegriCloud