aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-04-30 15:57:41 +0100
committerNick Clifton <nickc@redhat.com>2015-04-30 15:57:41 +0100
commit153a27763ccc9979fdb5f342e21eb1666c8f117b (patch)
treea8527ca767cce41501cb074adc94703df6cdd05d /binutils/readelf.c
parent914082d11b5de9509491615cce448ce937e91515 (diff)
downloadgdb-153a27763ccc9979fdb5f342e21eb1666c8f117b.zip
gdb-153a27763ccc9979fdb5f342e21eb1666c8f117b.tar.gz
gdb-153a27763ccc9979fdb5f342e21eb1666c8f117b.tar.bz2
Fix handling of relocs for the MeP target.
bfd PR 18317 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of mep_reloc. (mep_reloc): Delete unused function. bin * readelf.c (get_machine_flags): Add description of MeP flags. tests * binutils-all/objdump.exp (cpus_expected): Add MeP CPU names.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 724df24..0f53735 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -2892,6 +2892,40 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
}
break;
+ case EM_CYGNUS_MEP:
+ switch (e_flags & EF_MEP_CPU_MASK)
+ {
+ case EF_MEP_CPU_MEP: strcat (buf, ", generic MeP"); break;
+ case EF_MEP_CPU_C2: strcat (buf, ", MeP C2"); break;
+ case EF_MEP_CPU_C3: strcat (buf, ", MeP C3"); break;
+ case EF_MEP_CPU_C4: strcat (buf, ", MeP C4"); break;
+ case EF_MEP_CPU_C5: strcat (buf, ", MeP C5"); break;
+ case EF_MEP_CPU_H1: strcat (buf, ", MeP H1"); break;
+ default: strcat (buf, _(", <unknown MeP cpu type>")); break;
+ }
+
+ switch (e_flags & EF_MEP_COP_MASK)
+ {
+ case EF_MEP_COP_NONE: break;
+ case EF_MEP_COP_AVC: strcat (buf, ", AVC coprocessor"); break;
+ case EF_MEP_COP_AVC2: strcat (buf, ", AVC2 coprocessor"); break;
+ case EF_MEP_COP_FMAX: strcat (buf, ", FMAX coprocessor"); break;
+ case EF_MEP_COP_IVC2: strcat (buf, ", IVC2 coprocessor"); break;
+ default: strcat (buf, _("<unknown MeP copro type>")); break;
+ }
+
+ if (e_flags & EF_MEP_LIBRARY)
+ strcat (buf, ", Built for Library");
+
+ if (e_flags & EF_MEP_INDEX_MASK)
+ sprintf (buf + strlen (buf), ", Configuration Index: %#x",
+ e_flags & EF_MEP_INDEX_MASK);
+
+ if (e_flags & ~ EF_MEP_ALL_FLAGS)
+ sprintf (buf + strlen (buf), _(", unknown flags bits: %#x"),
+ e_flags & ~ EF_MEP_ALL_FLAGS);
+ break;
+
case EM_PPC:
if (e_flags & EF_PPC_EMB)
strcat (buf, ", emb");