summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Shinwell <shinwell@codesourcery.com>2006-10-16 13:09:20 +0000
committerMark Shinwell <shinwell@codesourcery.com>2006-10-16 13:09:20 +0000
commite7cf8c008935e3cac13a3ab954da7af4c2d5f1cd (patch)
treea41cf932fd5a0d00adca8772cdd16cb1fcf60697
parent02e0bada5a923f00ffef0e17af0e10868d8a97c3 (diff)
downloadbinutils-redhat-e7cf8c008935e3cac13a3ab954da7af4c2d5f1cd.tar.gz
bfd/
* elf32-arm.c (using_thumb2): Use TAG_CPU_* constants. include/ * elf/arm.h: Define TAG_CPU_ARCH_* constants.
-rw-r--r--ChangeLog.csl8
-rw-r--r--bfd/elf32-arm.c2
-rw-r--r--include/elf/arm.h13
3 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 561a5d7e17..2781bd4bff 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,3 +1,11 @@
+2006-10-16 Mark Shinwell <shinwell@codesourcery.com>
+
+ bfd/
+ * elf32-arm.c (using_thumb2): Use TAG_CPU_* constants.
+
+ include/
+ * elf/arm.h: Define TAG_CPU_ARCH_* constants.
+
2006-10-13 Nathan Sidwell <nathan@codesourcery.com>
gas/
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index d1fa73108d..9859b65dc4 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -3531,7 +3531,7 @@ identify_add_or_sub(bfd_vma insn)
static int using_thumb2 (struct elf32_arm_link_hash_table *globals)
{
int arch = elf32_arm_get_eabi_attr_int (globals->obfd, Tag_CPU_arch);
- return arch == 8 || arch >= 10;
+ return arch == TAG_CPU_ARCH_V6T2 || arch >= TAG_CPU_ARCH_V7;
}
/* Perform a relocation as part of a final link. */
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 6b7297733e..5945562816 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -84,6 +84,19 @@
#define PF_ARM_PI 0x20000000 /* Segment is position-independent. */
#define PF_ARM_ABS 0x40000000 /* Segment must be loaded at its base address. */
+/* Values for the Tag_CPU_arch EABI attribute. */
+#define TAG_CPU_ARCH_PRE_V4 0
+#define TAG_CPU_ARCH_V4 1
+#define TAG_CPU_ARCH_V4T 2
+#define TAG_CPU_ARCH_V5T 3
+#define TAG_CPU_ARCH_V5TE 4
+#define TAG_CPU_ARCH_V5TEJ 5
+#define TAG_CPU_ARCH_V6 6
+#define TAG_CPU_ARCH_V6KZ 7
+#define TAG_CPU_ARCH_V6T2 8
+#define TAG_CPU_ARCH_V6K 9
+#define TAG_CPU_ARCH_V7 10
+
/* Relocation types. */
START_RELOC_NUMBERS (elf_arm_reloc_type)