summaryrefslogtreecommitdiff
path: root/opcodes/sh-dis.c
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@arc.com>2002-05-22 13:17:27 +0000
committerJoern Rennecke <joern.rennecke@arc.com>2002-05-22 13:17:27 +0000
commit6bf48d4dcdc027e07e2aa5746d0a1fa52119eae5 (patch)
tree836b91eb8fd99b6b84e4f3c7b923421699b1c837 /opcodes/sh-dis.c
parentc0be49495b4c93370822fa0fd900fb9274237cb5 (diff)
downloadbinutils-redhat-6bf48d4dcdc027e07e2aa5746d0a1fa52119eae5.tar.gz
* sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4
for disassembly.
Diffstat (limited to 'opcodes/sh-dis.c')
-rw-r--r--opcodes/sh-dis.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c
index 54b91b7d98..7f403806dd 100644
--- a/opcodes/sh-dis.c
+++ b/opcodes/sh-dis.c
@@ -301,6 +301,11 @@ print_insn_sh (memaddr, info)
{
case bfd_mach_sh:
target_arch = arch_sh1;
+ /* SH coff object files lack information about the machine type, so
+ we end up with bfd_mach_sh unless it was set explicitly (which
+ could have happended if this is a call from gdb or the simulator.) */
+ if (bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour)
+ target_arch = arch_sh4;
break;
case bfd_mach_sh2:
target_arch = arch_sh2;