This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
readelf: print SH machine variant
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 28 Jul 2004 05:55:23 -0300
- Subject: readelf: print SH machine variant
- Organization: Red Hat Global Engineering Services Compiler Team
This patch enables readelf to identify the various SH machine types
supported by BFD. I'm checking it in.
Index: binutils/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
2003-07-08 Alexandre Oliva <aoliva@redhat.com>
* readelf.c (get_machine_flags <EM_SH)): Handle EF_SH4_NOFPU and
EF_SH4A_NOFPU.
2003-06-12 Alexandre Oliva <aoliva@redhat.com>
* readelf.c (get_machine_flags <EM_SH>): Print SH ISA name.
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/uberbaum/./binutils/readelf.c,v
retrieving revision 1.246
diff -u -p -r1.246 readelf.c
--- binutils/readelf.c 7 Jul 2004 17:28:48 -0000 1.246
+++ binutils/readelf.c 28 Jul 2004 08:47:42 -0000
@@ -1995,6 +1995,27 @@ get_machine_flags (unsigned e_flags, uns
break;
+ case EM_SH:
+ switch ((e_flags & EF_SH_MACH_MASK))
+ {
+ case EF_SH1: strcat (buf, ", sh1"); break;
+ case EF_SH2: strcat (buf, ", sh2"); break;
+ case EF_SH3: strcat (buf, ", sh3"); break;
+ case EF_SH_DSP: strcat (buf, ", sh-dsp"); break;
+ case EF_SH3_DSP: strcat (buf, ", sh3-dsp"); break;
+ case EF_SH4AL_DSP: strcat (buf, ", sh4al-dsp"); break;
+ case EF_SH3E: strcat (buf, ", sh3e"); break;
+ case EF_SH4: strcat (buf, ", sh4"); break;
+ case EF_SH5: strcat (buf, ", sh5"); break;
+ case EF_SH2E: strcat (buf, ", sh2e"); break;
+ case EF_SH4A: strcat (buf, ", sh4a"); break;
+ case EF_SH4_NOFPU: strcat (buf, ", sh4-nofpu"); break;
+ case EF_SH4A_NOFPU: strcat (buf, ", sh4a-nofpu"); break;
+ default: strcat (buf, ", unknown ISA"); break;
+ }
+
+ break;
+
case EM_SPARCV9:
if (e_flags & EF_SPARC_32PLUS)
strcat (buf, ", v8+");
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}