diff options
author | Ed Maste <emaste@FreeBSD.org> | 2016-05-20 18:54:42 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2016-05-20 18:54:42 +0000 |
commit | d28b40c8d9a22d135b2901e0bc0e9092fba2841e (patch) | |
tree | 086a4d2545dd51c38398a798c85a1d190d11c943 /contrib | |
parent | 0d1bd3bc6027203dbc48f91adc298eeaf2cb03a1 (diff) | |
download | src-d28b40c8d9a22d135b2901e0bc0e9092fba2841e.tar.gz src-d28b40c8d9a22d135b2901e0bc0e9092fba2841e.zip |
elftoolchain: backwards compatability for EM_IAMCU definition
It is not provided by sys/elf_common.h on older stable/10.
Notes
Notes:
svn path=/head/; revision=300320
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/elftoolchain/elfdump/elfdump.c | 5 | ||||
-rw-r--r-- | contrib/elftoolchain/libdwarf/libdwarf_reloc.c | 5 | ||||
-rw-r--r-- | contrib/elftoolchain/libelftc/elftc_reloc_type_str.c | 5 | ||||
-rw-r--r-- | contrib/elftoolchain/readelf/readelf.c | 3 |
4 files changed, 18 insertions, 0 deletions
diff --git a/contrib/elftoolchain/elfdump/elfdump.c b/contrib/elftoolchain/elfdump/elfdump.c index cf27ea6b9a94..02a1fa176f35 100644 --- a/contrib/elftoolchain/elfdump/elfdump.c +++ b/contrib/elftoolchain/elfdump/elfdump.c @@ -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 diff --git a/contrib/elftoolchain/libdwarf/libdwarf_reloc.c b/contrib/elftoolchain/libdwarf/libdwarf_reloc.c index 4ae8f5c3eb70..9b28f115296c 100644 --- a/contrib/elftoolchain/libdwarf/libdwarf_reloc.c +++ b/contrib/elftoolchain/libdwarf/libdwarf_reloc.c @@ -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) { diff --git a/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c b/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c index a22a1be7655b..eaae9827005c 100644 --- a/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c +++ b/contrib/elftoolchain/libelftc/elftc_reloc_type_str.c @@ -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) { diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index 79cb8b76c5d8..5bb028f6d112 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -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 |