summaryrefslogtreecommitdiffstats
path: root/contrib/elftoolchain
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2016-05-20 20:27:30 +0000
committeremaste <emaste@FreeBSD.org>2016-05-20 20:27:30 +0000
commit8b9acc6e766908c85f390f990f9fedac8c2551a5 (patch)
tree75607705d537303ada85c2aa298880b0a942f467 /contrib/elftoolchain
parent7ea7c965a90fc71c277ee915fb241c2c35114056 (diff)
downloadFreeBSD-src-8b9acc6e766908c85f390f990f9fedac8c2551a5.zip
FreeBSD-src-8b9acc6e766908c85f390f990f9fedac8c2551a5.tar.gz
elftoolchain: backwards compatability for EM_RISCV definition
It is not provided by sys/elf_common.h on older releases Reported by: Jenkins
Diffstat (limited to 'contrib/elftoolchain')
-rw-r--r--contrib/elftoolchain/elfdump/elfdump.c3
-rw-r--r--contrib/elftoolchain/libelftc/elftc_reloc_type_str.c3
-rw-r--r--contrib/elftoolchain/readelf/readelf.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/contrib/elftoolchain/elfdump/elfdump.c b/contrib/elftoolchain/elfdump/elfdump.c
index 02a1fa1..36a8dfd 100644
--- a/contrib/elftoolchain/elfdump/elfdump.c
+++ b/contrib/elftoolchain/elfdump/elfdump.c
@@ -56,6 +56,9 @@ ELFTC_VCSID("$Id: elfdump.c 3474 2016-05-17 20:44:53Z emaste $");
#ifndef EM_IAMCU
#define EM_IAMCU 6
#endif
+#ifndef EM_RISCV
+#define EM_RISCV 243
+#endif
#if defined(ELFTC_NEED_ELF_NOTE_DEFINITION)
#include "native-elf-format.h"
diff --git a/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c b/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
index eaae982..1e977a7 100644
--- a/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
+++ b/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
@@ -35,6 +35,9 @@
#ifndef EM_IAMCU
#define EM_IAMCU 6
#endif
+#ifndef EM_RISCV
+#define EM_RISCV 243
+#endif
const char *
elftc_reloc_type_str(unsigned int mach, unsigned int type)
diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c
index 5bb028f..ba59275 100644
--- a/contrib/elftoolchain/readelf/readelf.c
+++ b/contrib/elftoolchain/readelf/readelf.c
@@ -53,6 +53,9 @@ ELFTC_VCSID("$Id: readelf.c 3469 2016-05-15 23:16:09Z emaste $");
#ifndef EM_IAMCU
#define EM_IAMCU 6
#endif
+#ifndef EM_RISCV
+#define EM_RISCV 243
+#endif
#ifndef STB_GNU_UNIQUE
#define STB_GNU_UNIQUE 10
#endif
OpenPOWER on IntegriCloud