aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-03-21 10:34:11 +0000
committerNick Clifton <nickc@redhat.com>2013-03-21 10:34:11 +0000
commit088ca6c1e30939f069331a25dabd49d99f06fd8e (patch)
tree7d6d1f3aa95b408a2f9c7bf379d9097738e4e18b /bfd/elf32-arm.c
parentebacd51e16144e7e88e8c010b571d94a9d7ea232 (diff)
downloadgdb-088ca6c1e30939f069331a25dabd49d99f06fd8e.zip
gdb-088ca6c1e30939f069331a25dabd49d99f06fd8e.tar.gz
gdb-088ca6c1e30939f069331a25dabd49d99f06fd8e.tar.bz2
PR sim/15286
* elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale, iWMMXt and iWMMXt2 processors from attributes.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index aba1814..78c2d1d 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -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;