summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/readelf.c47
2 files changed, 49 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 0d027b0fbb8..80dd58e4af7 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * readelf.c (get_machine_flags): Add logic for EF_M68K flags.
+
2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (process_program_headers): Undo the last change.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index f0385d0f9c8..0bb2fdb2c5b 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -1940,10 +1940,53 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
break;
case EM_68K:
- if (e_flags & EF_CPU32)
+ if (e_flags & EF_M68K_CPU32)
strcat (buf, ", cpu32");
- if (e_flags & EF_M68000)
+ if (e_flags & EF_M68K_M68000)
strcat (buf, ", m68000");
+ if (e_flags & EF_M68K_ISA_MASK)
+ {
+ char const *isa = _("unknown");
+ char const *mac = _("unknown mac");
+
+ switch (e_flags & EF_M68K_ISA_MASK)
+ {
+ case EF_M68K_ISA_A:
+ isa = "A";
+ break;
+ case EF_M68K_ISA_A_PLUS:
+ isa = "A+";
+ break;
+ case EF_M68K_ISA_B:
+ isa = "B";
+ break;
+ }
+ strcat (buf, ", cf, isa ");
+ strcat (buf, isa);
+ if (e_flags & EF_M68K_HW_DIV)
+ strcat (buf, ", hwdiv");
+ switch (e_flags & EF_M68K_MAC_MASK)
+ {
+ case 0:
+ mac = NULL;
+ break;
+ case EF_M68K_MAC:
+ mac = "mac";
+ break;
+ case EF_M68K_EMAC:
+ mac = "emac";
+ break;
+ }
+ if (mac)
+ {
+ strcat (buf, ", ");
+ strcat (buf, mac);
+ }
+ if (e_flags & EF_M68K_USP)
+ strcat (buf, ", usp");
+ if (e_flags & EF_M68K_FLOAT)
+ strcat (buf, ", float");
+ }
break;
case EM_PPC: