gdb/sh: Use default gdbarch methods where possible
[deliverable/binutils-gdb.git] / bfd / elf32-rx.c
index e28edb6f689b4ca818aff923d1dd3d2ea2d4a5bd..e130784bc8f18b06e6250aed4add39b23614a317 100644 (file)
@@ -3212,7 +3212,12 @@ elf32_rx_machine (bfd * abfd ATTRIBUTE_UNUSED)
         For now we assume that the flags are OK.  */
   if ((elf_elfheader (abfd)->e_flags & EF_RX_CPU_MASK) == EF_RX_CPU_RX)
 #endif
-    return bfd_mach_rx;
+    if ((elf_elfheader (abfd)->e_flags & E_FLAG_RX_V2))
+      return bfd_mach_rx_v2;
+    else if ((elf_elfheader (abfd)->e_flags & E_FLAG_RX_V3))
+      return bfd_mach_rx_v3;
+    else
+      return bfd_mach_rx;
 
   return 0;
 }
@@ -3313,8 +3318,7 @@ rx_elf_object_p (bfd * abfd)
 static bfd_boolean
 rx_linux_object_p (bfd * abfd)
 {
-  bfd_default_set_arch_mach (abfd, bfd_arch_rx,
-           elf32_rx_machine (abfd));
+  bfd_default_set_arch_mach (abfd, bfd_arch_rx, elf32_rx_machine (abfd));
   return TRUE;
 }
  \f
@@ -4078,6 +4082,6 @@ rx_additional_link_map_text (bfd *obfd, struct bfd_link_info *info, FILE *mapfil
 #define elf_backend_object_p                   rx_linux_object_p
 #undef  elf_symbol_leading_char
 #undef elf32_bed
-#define        elf32_bed                               elf32_rx_le_linux_bed
+#define        elf32_bed                               elf32_rx_le_linux_bed
 
 #include "elf32-target.h"
This page took 0.039506 seconds and 4 git commands to generate.