From: Nick Clifton Date: Thu, 21 Mar 2013 10:34:11 +0000 (+0000) Subject: PR sim/15286 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=088ca6c1e30939f069331a25dabd49d99f06fd8e;p=binutils-gdb.git PR sim/15286 * elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale, iWMMXt and iWMMXt2 processors from attributes. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d30bd2e7015..85d5389abf9 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2013-03-21 Nick Clifton + + 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 * elflink.c (_bfd_elf_make_dynamic_reloc_section): Override diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index aba1814f855..78c2d1d7b7a 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;