svn commit: r300334 - in head/contrib/elftoolchain: elfdump libelftc readelf

Ed Maste emaste at FreeBSD.org
Fri May 20 20:27:32 UTC 2016


Author: emaste
Date: Fri May 20 20:27:30 2016
New Revision: 300334
URL: https://svnweb.freebsd.org/changeset/base/300334

Log:
  elftoolchain: backwards compatability for EM_RISCV definition
  
  It is not provided by sys/elf_common.h on older releases
  
  Reported by:	Jenkins

Modified:
  head/contrib/elftoolchain/elfdump/elfdump.c
  head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
  head/contrib/elftoolchain/readelf/readelf.c

Modified: head/contrib/elftoolchain/elfdump/elfdump.c
==============================================================================
--- head/contrib/elftoolchain/elfdump/elfdump.c	Fri May 20 20:01:10 2016	(r300333)
+++ head/contrib/elftoolchain/elfdump/elfdump.c	Fri May 20 20:27:30 2016	(r300334)
@@ -56,6 +56,9 @@ ELFTC_VCSID("$Id: elfdump.c 3474 2016-05
 #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"

Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
==============================================================================
--- head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c	Fri May 20 20:01:10 2016	(r300333)
+++ head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c	Fri May 20 20:27:30 2016	(r300334)
@@ -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)

Modified: head/contrib/elftoolchain/readelf/readelf.c
==============================================================================
--- head/contrib/elftoolchain/readelf/readelf.c	Fri May 20 20:01:10 2016	(r300333)
+++ head/contrib/elftoolchain/readelf/readelf.c	Fri May 20 20:27:30 2016	(r300334)
@@ -53,6 +53,9 @@ ELFTC_VCSID("$Id: readelf.c 3469 2016-05
 #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


More information about the svn-src-all mailing list