+2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
+ merging Tag_DIV_use, Tag_MPextension_use, and
+ Tag_MPextension_use_legacy tags.
+
2010-02-18 Alan Modra <amodra@gmail.com>
* elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
/* This is the first object. Copy the attributes. */
_bfd_elf_copy_obj_attributes (ibfd, obfd);
+ out_attr = elf_known_obj_attributes_proc (obfd);
+
/* Use the Tag_null value to indicate the attributes have been
initialized. */
- elf_known_obj_attributes_proc (obfd)[0].i = 1;
+ out_attr[0].i = 1;
- return TRUE;
+ /* We do not output objects with Tag_MPextension_use_legacy - we move
+ the attribute's value to Tag_MPextension_use. */
+ if (out_attr[Tag_MPextension_use_legacy].i != 0)
+ {
+ if (out_attr[Tag_MPextension_use].i != 0
+ && out_attr[Tag_MPextension_use_legacy].i
+ != out_attr[Tag_MPextension_use].i)
+ {
+ _bfd_error_handler
+ (_("Error: %B has both the current and legacy "
+ "Tag_MPextension_use attributes"), ibfd);
+ result = FALSE;
+ }
+
+ out_attr[Tag_MPextension_use] =
+ out_attr[Tag_MPextension_use_legacy];
+ out_attr[Tag_MPextension_use_legacy].type = 0;
+ out_attr[Tag_MPextension_use_legacy].i = 0;
+ }
+
+ return result;
}
in_attr = elf_known_obj_attributes_proc (ibfd);
out_attr[i].i = in_attr[i].i;
break;
+ case Tag_DIV_use:
+ /* This tag is set to zero if we can use UDIV and SDIV in Thumb
+ mode on a v7-M or v7-R CPU; to one if we can not use UDIV or
+ SDIV at all; and to two if we can use UDIV or SDIV on a v7-A
+ CPU. We will merge as follows: If the input attribute's value
+ is one then the output attribute's value remains unchanged. If
+ the input attribute's value is zero or two then if the output
+ attribute's value is one the output value is set to the input
+ value, otherwise the output value must be the same as the
+ inputs. */
+ if (in_attr[i].i != 1 && out_attr[i].i != 1)
+ {
+ if (in_attr[i].i != out_attr[i].i)
+ {
+ _bfd_error_handler
+ (_("DIV usage mismatch between %B and %B"),
+ ibfd, obfd);
+ result = FALSE;
+ }
+ }
+
+ if (in_attr[i].i != 1)
+ out_attr[i].i = in_attr[i].i;
+
+ break;
+
+ case Tag_MPextension_use_legacy:
+ /* We don't output objects with Tag_MPextension_use_legacy - we
+ move the value to Tag_MPextension_use. */
+ if (in_attr[i].i != 0 && in_attr[Tag_MPextension_use].i != 0)
+ {
+ if (in_attr[Tag_MPextension_use].i != in_attr[i].i)
+ {
+ _bfd_error_handler
+ (_("%B has has both the current and legacy "
+ "Tag_MPextension_use attributes"),
+ ibfd);
+ result = FALSE;
+ }
+ }
+
+ if (in_attr[i].i > out_attr[Tag_MPextension_use].i)
+ out_attr[Tag_MPextension_use] = in_attr[i];
+
+ break;
+
case Tag_nodefaults:
/* This tag is set if it exists, but the value is unused (and is
typically zero). We don't actually need to do anything here -
+2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * readelf.c (arm_attr_tag_Advanced_SIMD_arch): Add description of
+ newly permitted attribute values.
+ (arm_attr_tag_Virtualization_use): Likewise.
+ (arm_attr_tag_DIV_use): Add description of new attribute.
+ (arm_attr_tag_MPextension_use_legacy): Likewise.
+
2010-02-15 Nick Clifton <nickc@redhat.com>
* po/vi.po: Updated Vietnamese translation.
static const char * arm_attr_tag_VFP_arch[] =
{"No", "VFPv1", "VFPv2", "VFPv3", "VFPv3-D16", "VFPv4", "VFPv4-D16"};
static const char * arm_attr_tag_WMMX_arch[] = {"No", "WMMXv1", "WMMXv2"};
-static const char * arm_attr_tag_Advanced_SIMD_arch[] = {"No", "NEONv1"};
+static const char * arm_attr_tag_Advanced_SIMD_arch[] =
+ {"No", "NEONv1", "NEONv1 with Fused-MAC"};
static const char * arm_attr_tag_PCS_config[] =
{"None", "Bare platform", "Linux application", "Linux DSO", "PalmOS 2004",
"PalmOS (reserved)", "SymbianOS 2004", "SymbianOS (reserved)"};
{"Not Allowed", "Allowed"};
static const char * arm_attr_tag_ABI_FP_16bit_format[] =
{"None", "IEEE 754", "Alternative Format"};
+static const char * arm_attr_tag_MPextension_use[] =
+ {"Not Allowed", "Allowed"};
+static const char * arm_attr_tag_DIV_use[] =
+ {"Allowed in Thumb-ISA, v7-R or v7-M", "Not allowed",
+ "Allowed in v7-A with integer division extension"};
static const char * arm_attr_tag_T2EE_use[] = {"Not Allowed", "Allowed"};
static const char * arm_attr_tag_Virtualization_use[] =
+ {"Not Allowed", "TrustZone", "Virtualization Extensions",
+ "TrustZone and Virtualization Extensions"};
+static const char * arm_attr_tag_MPextension_use_legacy[] =
{"Not Allowed", "Allowed"};
-static const char * arm_attr_tag_MPextension_use[] = {"Not Allowed", "Allowed"};
#define LOOKUP(id, name) \
{id, #name, 0x80 | ARRAY_SIZE(arm_attr_tag_##name), arm_attr_tag_##name}
LOOKUP(34, CPU_unaligned_access),
LOOKUP(36, VFP_HP_extension),
LOOKUP(38, ABI_FP_16bit_format),
+ LOOKUP(42, MPextension_use),
+ LOOKUP(44, DIV_use),
{64, "nodefaults", 0, NULL},
{65, "also_compatible_with", 0, NULL},
LOOKUP(66, T2EE_use),
{67, "conformance", 1, NULL},
LOOKUP(68, Virtualization_use),
- LOOKUP(70, MPextension_use)
+ LOOKUP(70, MPextension_use_legacy)
};
#undef LOOKUP
+2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * config/tc-arm.c (arm_convert_symbolic_attribute): Add Tag_DIV_use.
+ * doc/c-arm.texi: Likewise.
+
2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
* config/tc-arm.c (asm_opcode): operands type
T (Tag_CPU_unaligned_access),
T (Tag_VFP_HP_extension),
T (Tag_ABI_FP_16bit_format),
+ T (Tag_MPextension_use),
+ T (Tag_DIV_use),
T (Tag_nodefaults),
T (Tag_also_compatible_with),
T (Tag_conformance),
T (Tag_T2EE_use),
T (Tag_Virtualization_use),
- T (Tag_MPextension_use)
+ /* We deliberately do not include Tag_MPextension_use_legacy. */
#undef T
};
unsigned int i;
@code{Tag_ABI_optimization_goals}, @code{Tag_ABI_FP_optimization_goals},
@code{Tag_compatibility}, @code{Tag_CPU_unaligned_access},
@code{Tag_VFP_HP_extension}, @code{Tag_ABI_FP_16bit_format},
+@code{Tag_MPextension_use}, @code{Tag_DIV_use},
@code{Tag_nodefaults}, @code{Tag_also_compatible_with},
@code{Tag_conformance}, @code{Tag_T2EE_use},
-@code{Tag_Virtualization_use}, @code{Tag_MPextension_use}
+@code{Tag_Virtualization_use}
The @var{value} is either a @code{number}, @code{"string"}, or
@code{number, "string"} depending on the tag.
+2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * gas/arm/attr-order.d: Fix test for new names for attribute
+ values.
+
2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
* gas/arm/sp-pc-validations-bad.d: New testcase.
Tag_unknown_63: "val"
Tag_also_compatible_with: v6-M
Tag_T2EE_use: Allowed
- Tag_Virtualization_use: Allowed
+ Tag_Virtualization_use: TrustZone
+2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * arm.h (Tag_MPextension_use): Renumber.
+ (Tag_DIV_use): Add.
+ (Tag_MPextension_use_legacy): Likewise.
+
2010-02-09 Michael Holzheu <holzheu@de.ibm.com>
* common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG,
Tag_undefined37,
Tag_ABI_FP_16bit_format,
Tag_undefined39,
+ Tag_undefined40,
+ Tag_undefined41,
+ Tag_MPextension_use,
+ Tag_undefined_43,
+ Tag_DIV_use,
Tag_nodefaults = 64,
Tag_also_compatible_with,
Tag_T2EE_use,
Tag_conformance,
Tag_Virtualization_use,
Tag_undefined69,
- Tag_MPextension_use
+ Tag_MPextension_use_legacy
};
#endif
+2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * ld-arm/attr-merge-3.attr: Fix test for new attribute values.
+ * ld-arm/attr-merge-3b.s: Likewise.
+ * ld-arm/attr-merge-unknown-1.d: Fix test now that 42 is a recognised
+ attribute ID.
+ * ld-arm/attr-merge-unknown-1.s: Likewise.
+ * ld-arm/attr-merge-6.attr: New test.
+ * ld-arm/attr-merge-6a.s: Likewise.
+ * ld-arm/attr-merge-6b.s: Likewise.
+ * ld-arm/attr-merge-7.attr: Likewise.
+ * ld-arm/attr-merge-7a.s: Likewise.
+ * ld-arm/attr-merge-7b.s: Likewise.
+ * ld-arm/arm-elf.exp: Run the new tests.
+
2010-02-15 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ld-arm/jump-reloc-veneers-long.d: Correct testcase for
{"EABI attribute merging 5" "-r" "" {attr-merge-5.s attr-merge-5.s}
{{readelf -A attr-merge-5.attr}}
"attr-merge-5"}
+ {"EABI attribute merging 6" "-r" "" {attr-merge-6a.s attr-merge-6b.s}
+ {{readelf -A attr-merge-6.attr}}
+ "attr-merge-6"}
+ {"EABI attribute merging 6 reversed" "-r" "" {attr-merge-6b.s attr-merge-6a.s}
+ {{readelf -A attr-merge-6.attr}}
+ "attr-merge-6r"}
+ {"EABI attribute merging 7" "-r" "" {attr-merge-7a.s attr-merge-7b.s}
+ {{readelf -A attr-merge-7.attr}}
+ "attr-merge-7"}
{"EABI attribute arch merging 1" "-r" "" {arch-v6k.s arch-v6t2.s}
{{readelf -A attr-merge-arch-1.attr}}
"attr-merge-arch-1"}
Tag_ABI_VFP_args: VFP registers
Tag_CPU_unaligned_access: v6
Tag_VFP_HP_extension: Allowed
- Tag_T2EE_use: Allowed
- Tag_Virtualization_use: Allowed
Tag_MPextension_use: Allowed
+ Tag_T2EE_use: Allowed
+ Tag_Virtualization_use: TrustZone
.eabi_attribute Tag_nodefaults, 1
@ .eabi_attribute Tag_also_compatible_with,
.eabi_attribute Tag_T2EE_use, 1
- .eabi_attribute Tag_conformance, "2.07"
+ .eabi_attribute Tag_conformance, "2.08"
.eabi_attribute Tag_Virtualization_use, 1
.eabi_attribute Tag_MPextension_use, 1
--- /dev/null
+ .cpu cortex-a9
+ .fpu softvfp
+ .eabi_attribute 70, 1
+ .file "attr-merge-6a.s"
--- /dev/null
+ .cpu cortex-a9
+ .fpu softvfp
+ .file "attr-merge-6b.s"
--- /dev/null
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "CORTEX-A9"
+ Tag_CPU_arch: v7
+ Tag_CPU_arch_profile: Application
+ Tag_ARM_ISA_use: Yes
+ Tag_THUMB_ISA_use: Thumb-2
+ Tag_MPextension_use: Allowed
+
--- /dev/null
+ .cpu cortex-a9
+ .fpu softvfp
+ .eabi_attribute 70, 1
+ .file "attr-merge-7a.s"
--- /dev/null
+ .cpu cortex-a9
+ .fpu softvfp
+ .eabi_attribute Tag_MPextension_use, 1
+ .file "attr-merge-7b.s"
#source: blank.s
#as:
#ld:
-#error: Unknown mandatory EABI object attribute 42
+#error: Unknown mandatory EABI object attribute 40
@ This attrubute is supposed to be unknown.
@ If this number should become known, change it.
- .eabi_attribute 42, 1
+ .eabi_attribute 40, 1