This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
moxie readelf
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 22 Jul 2010 14:24:35 +0930
- Subject: moxie readelf
Another fix for dwarf2 test failures, in this case due to total lack
of support in readelf.
* readelf.c: Add Moxie support.
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.507
diff -u -p -r1.507 readelf.c
--- binutils/readelf.c 20 Jul 2010 14:08:31 -0000 1.507
+++ binutils/readelf.c 20 Jul 2010 14:21:36 -0000
@@ -125,6 +125,7 @@
#include "elf/mmix.h"
#include "elf/mn10200.h"
#include "elf/mn10300.h"
+#include "elf/moxie.h"
#include "elf/mt.h"
#include "elf/msp430.h"
#include "elf/or32.h"
@@ -646,6 +647,7 @@ guess_is_rela (unsigned int e_machine)
case EM_CYGNUS_MN10200:
case EM_MN10300:
case EM_CYGNUS_MN10300:
+ case EM_MOXIE:
case EM_MSP430:
case EM_MSP430_OLD:
case EM_MT:
@@ -1130,6 +1132,10 @@ dump_relocations (FILE * file,
rtype = elf_mmix_reloc_type (type);
break;
+ case EM_MOXIE:
+ rtype = elf_moxie_reloc_type (type);
+ break;
+
case EM_MSP430:
case EM_MSP430_OLD:
rtype = elf_msp430_reloc_type (type);
@@ -1906,6 +1912,7 @@ get_machine_name (unsigned e_machine)
case EM_MN10300: return "mn10300";
case EM_CYGNUS_MN10200:
case EM_MN10200: return "mn10200";
+ case EM_MOXIE: return "Moxie";
case EM_CYGNUS_FR30:
case EM_FR30: return "Fujitsu FR30";
case EM_CYGNUS_FRV: return "Fujitsu FR-V";
@@ -9240,6 +9247,8 @@ is_32bit_abs_reloc (unsigned int reloc_t
case EM_CYGNUS_MN10300:
case EM_MN10300:
return reloc_type == 1; /* R_MN10300_32. */
+ case EM_MOXIE:
+ return reloc_type == 1; /* R_MOXIE_32. */
case EM_MSP430_OLD:
case EM_MSP430:
return reloc_type == 1; /* R_MSP43_32. */
@@ -9501,6 +9510,7 @@ is_none_reloc (unsigned int reloc_type)
case EM_X86_64: /* R_X86_64_NONE. */
case EM_L1OM: /* R_X86_64_NONE. */
case EM_MN10300: /* R_MN10300_NONE. */
+ case EM_MOXIE: /* R_MOXIE_NONE. */
case EM_M32R: /* R_M32R_NONE. */
case EM_TI_C6000:/* R_C6000_NONE. */
case EM_XC16X:
--
Alan Modra
Australia Development Lab, IBM