PR sim/15286
authorNick Clifton <nickc@redhat.com>
Thu, 21 Mar 2013 10:34:11 +0000 (10:34 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 21 Mar 2013 10:34:11 +0000 (10:34 +0000)
* elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale,
iWMMXt and iWMMXt2 processors from attributes.

bfd/ChangeLog
bfd/elf32-arm.c

index d30bd2e701557991662e5d5374e3922a6b4dfb4c..85d5389abf9b4d6acc997491eb05a96a99e8522f 100644 (file)
@@ -1,3 +1,9 @@
+2013-03-21  Nick Clifton  <nickc@redhat.com>
+
+       PR sim/15286
+       * elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale,
+       iWMMXt and iWMMXt2 processors from attributes.
+
 2013-03-20  Alan Modra  <amodra@gmail.com>
 
        * elflink.c (_bfd_elf_make_dynamic_reloc_section): Override
index aba1814f8555933f8a98da214bd9708336da6000..78c2d1d7b7a4a1bb6aa025e5d2c7fdcafdb1b796 100644 (file)
@@ -10958,6 +10958,20 @@ bfd_arm_get_mach_from_attributes (bfd * abfd)
 
            if (strcmp (name, "IWMMXT") == 0)
              return bfd_mach_arm_iWMMXt;
+
+           if (strcmp (name, "XSCALE") == 0)
+             {
+               int wmmx;
+
+               BFD_ASSERT (Tag_WMMX_arch < NUM_KNOWN_OBJ_ATTRIBUTES);
+               wmmx = elf_known_obj_attributes (abfd) [OBJ_ATTR_PROC][Tag_WMMX_arch].i;
+               switch (wmmx)
+                 {
+                 case 1: return bfd_mach_arm_iWMMXt;
+                 case 2: return bfd_mach_arm_iWMMXt2;
+                 default: return bfd_mach_arm_XScale;
+                 }
+             }
          }
 
        return bfd_mach_arm_5TE;