From 5b276dc0a637c253b9aa759df2b853274c54dc43 Mon Sep 17 00:00:00 2001 From: Mark Shinwell Date: Mon, 16 Oct 2006 13:09:20 +0000 Subject: bfd/ * elf32-arm.c (using_thumb2): Use TAG_CPU_* constants. include/ * elf/arm.h: Define TAG_CPU_ARCH_* constants. --- ChangeLog.csl | 8 ++++++++ bfd/elf32-arm.c | 2 +- include/elf/arm.h | 13 +++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog.csl b/ChangeLog.csl index 561a5d7e173..2781bd4bff9 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,3 +1,11 @@ +2006-10-16 Mark Shinwell + + bfd/ + * elf32-arm.c (using_thumb2): Use TAG_CPU_* constants. + + include/ + * elf/arm.h: Define TAG_CPU_ARCH_* constants. + 2006-10-13 Nathan Sidwell gas/ diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index d1fa73108da..9859b65dc4a 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 6b7297733ef..59455628165 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) -- cgit v1.2.1