Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2016 18:54:42 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300320 - in head/contrib/elftoolchain: elfdump libdwarf libelftc readelf
Message-ID:  <201605201854.u4KIsgq3011818@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri May 20 18:54:42 2016
New Revision: 300320
URL: https://svnweb.freebsd.org/changeset/base/300320

Log:
  elftoolchain: backwards compatability for EM_IAMCU definition
  
  It is not provided by sys/elf_common.h on older stable/10.

Modified:
  head/contrib/elftoolchain/elfdump/elfdump.c
  head/contrib/elftoolchain/libdwarf/libdwarf_reloc.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 18:01:53 2016	(r300319)
+++ head/contrib/elftoolchain/elfdump/elfdump.c	Fri May 20 18:54:42 2016	(r300320)
@@ -52,6 +52,11 @@
 
 ELFTC_VCSID("$Id: elfdump.c 3474 2016-05-17 20:44:53Z emaste $");
 
+/* Backwards compatability for older FreeBSD releases. */
+#ifndef EM_IAMCU
+#define EM_IAMCU 6
+#endif
+
 #if defined(ELFTC_NEED_ELF_NOTE_DEFINITION)
 #include "native-elf-format.h"
 #if ELFTC_CLASS == ELFCLASS32

Modified: head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c
==============================================================================
--- head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c	Fri May 20 18:01:53 2016	(r300319)
+++ head/contrib/elftoolchain/libdwarf/libdwarf_reloc.c	Fri May 20 18:54:42 2016	(r300320)
@@ -28,6 +28,11 @@
 
 ELFTC_VCSID("$Id: libdwarf_reloc.c 3198 2015-05-14 18:36:19Z emaste $");
 
+/* Backwards compatability for older FreeBSD releases. */
+#ifndef EM_IAMCU
+#define EM_IAMCU 6
+#endif
+
 Dwarf_Unsigned
 _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64)
 {

Modified: head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c
==============================================================================
--- head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c	Fri May 20 18:01:53 2016	(r300319)
+++ head/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c	Fri May 20 18:54:42 2016	(r300320)
@@ -31,6 +31,11 @@
 #include <libelftc.h>
 #include <stdio.h>
 
+/* Backwards compatability for older FreeBSD releases. */
+#ifndef EM_IAMCU
+#define EM_IAMCU 6
+#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 18:01:53 2016	(r300319)
+++ head/contrib/elftoolchain/readelf/readelf.c	Fri May 20 18:54:42 2016	(r300320)
@@ -50,6 +50,9 @@
 ELFTC_VCSID("$Id: readelf.c 3469 2016-05-15 23:16:09Z emaste $");
 
 /* Backwards compatability for older FreeBSD releases. */
+#ifndef EM_IAMCU
+#define EM_IAMCU 6
+#endif
 #ifndef	STB_GNU_UNIQUE
 #define	STB_GNU_UNIQUE 10
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605201854.u4KIsgq3011818>