elftoolchain: backwards compatability for EM_IAMCU definition

It is not provided by sys/elf_common.h on older stable/10.
This commit is contained in:
Ed Maste 2016-05-20 18:54:42 +00:00
parent 0d1bd3bc60
commit d28b40c8d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300320
4 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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