summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elf32-arm.c12
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/readelf.c2
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/arm-tdep.c15
-rw-r--r--gold/ChangeLog8
-rw-r--r--gold/arm.cc14
-rw-r--r--include/elf/ChangeLog4
-rw-r--r--include/elf/arm.h17
-rw-r--r--ld/testsuite/ChangeLog13
-rw-r--r--ld/testsuite/ld-arm/attr-merge-2.attr1
-rw-r--r--ld/testsuite/ld-arm/attr-merge-2a.s1
-rw-r--r--ld/testsuite/ld-arm/attr-merge-2b.s1
-rw-r--r--ld/testsuite/ld-arm/attr-merge-4.attr2
-rw-r--r--ld/testsuite/ld-arm/attr-merge-4a.s3
-rw-r--r--ld/testsuite/ld-arm/attr-merge-4b.s3
-rw-r--r--ld/testsuite/ld-arm/attr-merge-6.attr1
-rw-r--r--ld/testsuite/ld-arm/attr-merge-6a.s2
-rw-r--r--ld/testsuite/ld-arm/attr-merge-6b.s2
20 files changed, 107 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c85bd07e7f5..8bfb2600e60 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
+ Tag_ABI_VFP_args value and replace hardcoded values by enum values.
+ (elf32_arm_post_process_headers): Set e_flags in ELF header as hard
+ float only when Tag_ABI_VFP_args is 1, using new enum value
+ AEABI_VFP_args_vfp to check that.
+
2014-12-24 H.J. Lu <hongjiu.lu@intel.com>
* pei-x86_64.c (pex64_bfd_print_pdata_section): Add cast to
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 5b2f66f0f91..09c5aa44df8 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -11753,10 +11753,14 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
/* This needs to happen before Tag_ABI_FP_number_model is merged. */
if (in_attr[Tag_ABI_VFP_args].i != out_attr[Tag_ABI_VFP_args].i)
{
- /* Ignore mismatches if the object doesn't use floating point. */
- if (out_attr[Tag_ABI_FP_number_model].i == 0)
+ /* Ignore mismatches if the object doesn't use floating point or is
+ floating point ABI independent. */
+ if (out_attr[Tag_ABI_FP_number_model].i == AEABI_FP_number_model_none
+ || (in_attr[Tag_ABI_FP_number_model].i != AEABI_FP_number_model_none
+ && out_attr[Tag_ABI_VFP_args].i == AEABI_VFP_args_compatible))
out_attr[Tag_ABI_VFP_args].i = in_attr[Tag_ABI_VFP_args].i;
- else if (in_attr[Tag_ABI_FP_number_model].i != 0)
+ else if (in_attr[Tag_ABI_FP_number_model].i != AEABI_FP_number_model_none
+ && in_attr[Tag_ABI_VFP_args].i != AEABI_VFP_args_compatible)
{
_bfd_error_handler
(_("error: %B uses VFP register arguments, %B does not"),
@@ -14719,7 +14723,7 @@ elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT
&& ((i_ehdrp->e_type == ET_DYN) || (i_ehdrp->e_type == ET_EXEC)))
{
int abi = bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC, Tag_ABI_VFP_args);
- if (abi)
+ if (abi == AEABI_VFP_args_vfp)
i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_HARD;
else
i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_SOFT;
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 6eae51655b3..cf2cc031fe5 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * readelf.c (arm_attr_tag_ABI_VFP_args): Add "compatible".
+
2014-12-24 Alexander Cherepanov <cherepan@mccme.ru>
PR binutils/17671
diff --git a/binutils/readelf.c b/binutils/readelf.c
index d9ddb35b86c..8a532487eab 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12213,7 +12213,7 @@ static const char * arm_attr_tag_ABI_enum_size[] =
static const char * arm_attr_tag_ABI_HardFP_use[] =
{"As Tag_FP_arch", "SP only", "DP only", "SP and DP"};
static const char * arm_attr_tag_ABI_VFP_args[] =
- {"AAPCS", "VFP registers", "custom"};
+ {"AAPCS", "VFP registers", "custom", "compatible"};
static const char * arm_attr_tag_ABI_WMMX_args[] =
{"AAPCS", "WMMX registers", "custom"};
static const char * arm_attr_tag_ABI_optimization_goals[] =
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index dc1cb15f1a3..d7373cd3dd9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * arm-tdep.c (arm_gdbarch_init): Explicitely handle value 3 of
+ Tag_ABI_VFP_args. Also replace hardcoded values by enum values in the
+ switch handling the different values of Tag_ABI_VFP_args.
+
2014-12-23 Doug Evans <xdje42@gmail.com>
* ada-lang.c (user_select_syms): Only fetch symtab if symbol is
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index a4f99c58fb5..e12ae6e633e 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -9968,27 +9968,34 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
OBJ_ATTR_PROC,
Tag_ABI_VFP_args))
{
- case 0:
+ case (int) AEABI_VFP_args_base:
/* "The user intended FP parameter/result
passing to conform to AAPCS, base
variant". */
fp_model = ARM_FLOAT_SOFT_VFP;
break;
- case 1:
+ case (int) AEABI_VFP_args_vfp:
/* "The user intended FP parameter/result
passing to conform to AAPCS, VFP
variant". */
fp_model = ARM_FLOAT_VFP;
break;
- case 2:
+ case (int) AEABI_VFP_args_toolchain:
/* "The user intended FP parameter/result
passing to conform to tool chain-specific
conventions" - we don't know any such
conventions, so leave it as "auto". */
break;
+ case (int) AEABI_VFP_args_compatible:
+ /* "Code is compatible with both the base
+ and VFP variants; the user did not permit
+ non-variadic functions to pass FP
+ parameters/results" - leave it as
+ "auto". */
+ break;
default:
/* Attribute value not mentioned in the
- October 2008 ABI, so leave it as
+ November 2012 ABI, so leave it as
"auto". */
break;
}
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 457fa6b87b9..f4983cba130 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,11 @@
+2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * arm.cc (Target_arm::do_adjust_elf_header): Set e_flags in ELF header
+ as hard float only when Tag_ABI_VFP_args is 1, using new enum value
+ AEABI_VFP_args_vfp to check that.
+ (Target_arm::merge_object_attributes): Handle new Tag_ABI_VFP_args
+ value and replace hardcoded values by enum values.
+
2014-12-22 Cary Coutant <ccoutant@google.com>
* powerpc.cc (Target_powerpc::relocate): Fix overflow check.
diff --git a/gold/arm.cc b/gold/arm.cc
index 6c472bb4694..4186a2a7fd5 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -10056,7 +10056,7 @@ Target_arm<big_endian>::do_adjust_elf_header(
if (type == elfcpp::ET_EXEC || type == elfcpp::ET_DYN)
{
Object_attribute* attr = this->get_aeabi_object_attribute(elfcpp::Tag_ABI_VFP_args);
- if (attr->int_value())
+ if (attr->int_value() == AEABI_VFP_args_vfp)
flags |= elfcpp::EF_ARM_ABI_FLOAT_HARD;
else
flags |= elfcpp::EF_ARM_ABI_FLOAT_SOFT;
@@ -10493,10 +10493,18 @@ Target_arm<big_endian>::merge_object_attributes(
!= out_attr[elfcpp::Tag_ABI_VFP_args].int_value())
{
// Ignore mismatches if the object doesn't use floating point. */
- if (out_attr[elfcpp::Tag_ABI_FP_number_model].int_value() == 0)
+ if (out_attr[elfcpp::Tag_ABI_FP_number_model].int_value()
+ == AEABI_FP_number_model_none
+ || (in_attr[elfcpp::Tag_ABI_FP_number_model].int_value()
+ != AEABI_FP_number_model_none
+ && out_attr[elfcpp::Tag_ABI_VFP_args].int_value()
+ == AEABI_VFP_args_compatible))
out_attr[elfcpp::Tag_ABI_VFP_args].set_int_value(
in_attr[elfcpp::Tag_ABI_VFP_args].int_value());
- else if (in_attr[elfcpp::Tag_ABI_FP_number_model].int_value() != 0
+ else if (in_attr[elfcpp::Tag_ABI_FP_number_model].int_value()
+ != AEABI_FP_number_model_none
+ && in_attr[elfcpp::Tag_ABI_VFP_args].int_value()
+ != AEABI_VFP_args_compatible
&& parameters->options().warn_mismatch())
gold_error(_("%s uses VFP register arguments, output does not"),
name);
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index f4f71077c0f..942923dc6dd 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * arm.h: New AEABI_FP_number_model_* and AEABI_VFP_args_* enum values.
+
2014-12-06 Eric Botcazou <ebotcazou@adacore.com>
* common.h (EM_VISIUM): Define.
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 34afdfd9f4d..e85536b7e23 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -319,6 +319,23 @@ enum
Tag_VFP_HP_extension = Tag_FP_HP_extension
};
+/* Values for Tag_ABI_FP_number_model. */
+enum
+{
+ AEABI_FP_number_model_none = 0,
+ AEABI_FP_number_model_ieee754_number = 1,
+ AEABI_FP_number_model_rtabi = 2,
+ AEABI_FP_number_model_ieee754_all = 3
+};
+
+/* Values for Tag_ABI_VFP_args. */
+enum
+{
+ AEABI_VFP_args_base = 0,
+ AEABI_VFP_args_vfp = 1,
+ AEABI_VFP_args_toolchain = 2,
+ AEABI_VFP_args_compatible = 3
+};
#endif
/* The name of the note section used to identify arm variants. */
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index d987267775c..a8c5a79487b 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * ld-arm/attr-merge-2a.s: Add Tag_ABI_VFP_args.
+ * ld-arm/attr-merge-2b.s: Likewise.
+ * ld-arm/attr-merge-2.attr: Likewise.
+ * ld-arm/attr-merge-4a.s: Add Tag_ABI_FP_number_model and
+ Tag_ABI_VFP_args.
+ * ld-arm/attr-merge-4b.s: Likewise.
+ * ld-arm/attr-merge-4.attr: Likewise.
+ * ld-arm/attr-merge-6a.s: Likewise.
+ * ld-arm/attr-merge-6b.s: Likewise.
+ * ld-arm/attr-merge-6.attr: Add Tag_ABI_FP_number_model.
+
2014-12-24 Andrew Burgess <andrew.burgess@embecosm.com>
* ld/testsuite/ld-avr/relax-elf-flags-02.d: Add -mno-link-relax
diff --git a/ld/testsuite/ld-arm/attr-merge-2.attr b/ld/testsuite/ld-arm/attr-merge-2.attr
index 578333b2633..9f63df46004 100644
--- a/ld/testsuite/ld-arm/attr-merge-2.attr
+++ b/ld/testsuite/ld-arm/attr-merge-2.attr
@@ -11,4 +11,5 @@ File Attributes
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: small
+ Tag_ABI_VFP_args: VFP registers
Tag_ABI_optimization_goals: Aggressive Debug
diff --git a/ld/testsuite/ld-arm/attr-merge-2a.s b/ld/testsuite/ld-arm/attr-merge-2a.s
index 03031634b00..8a7260cec65 100644
--- a/ld/testsuite/ld-arm/attr-merge-2a.s
+++ b/ld/testsuite/ld-arm/attr-merge-2a.s
@@ -6,5 +6,6 @@
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
+ .eabi_attribute 28, 3
.eabi_attribute 30, 6
.file "attr-merge-2a.s"
diff --git a/ld/testsuite/ld-arm/attr-merge-2b.s b/ld/testsuite/ld-arm/attr-merge-2b.s
index 047890a04d1..a22776b71e7 100644
--- a/ld/testsuite/ld-arm/attr-merge-2b.s
+++ b/ld/testsuite/ld-arm/attr-merge-2b.s
@@ -6,6 +6,7 @@
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
+ .eabi_attribute 28, 1
.eabi_attribute 30, 6
.eabi_attribute 18, 4
.file "attr-merge-2b.s"
diff --git a/ld/testsuite/ld-arm/attr-merge-4.attr b/ld/testsuite/ld-arm/attr-merge-4.attr
index 75fd063117d..f74b02411d8 100644
--- a/ld/testsuite/ld-arm/attr-merge-4.attr
+++ b/ld/testsuite/ld-arm/attr-merge-4.attr
@@ -5,4 +5,6 @@ File Attributes
Tag_CPU_arch_profile: Microcontroller
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
+ Tag_ABI_FP_number_model: IEEE 754
+ Tag_ABI_VFP_args: compatible
Tag_also_compatible_with: v6-M
diff --git a/ld/testsuite/ld-arm/attr-merge-4a.s b/ld/testsuite/ld-arm/attr-merge-4a.s
index b5b77bf136e..9282fa217fe 100644
--- a/ld/testsuite/ld-arm/attr-merge-4a.s
+++ b/ld/testsuite/ld-arm/attr-merge-4a.s
@@ -5,3 +5,6 @@
@ Tag_also_compatible_with = v6-M
.eabi_attribute Tag_also_compatible_with, "\006\013"
+
+ .eabi_attribute Tag_ABI_FP_number_model, 3
+ .eabi_attribute Tag_ABI_VFP_args, 3
diff --git a/ld/testsuite/ld-arm/attr-merge-4b.s b/ld/testsuite/ld-arm/attr-merge-4b.s
index d2eb6de681d..2cf68df2577 100644
--- a/ld/testsuite/ld-arm/attr-merge-4b.s
+++ b/ld/testsuite/ld-arm/attr-merge-4b.s
@@ -5,3 +5,6 @@
@ Tag_also_compatible_with = v4T
.eabi_attribute Tag_also_compatible_with, "\006\002"
+
+ .eabi_attribute Tag_ABI_FP_number_model, 0
+ .eabi_attribute Tag_ABI_VFP_args, 0
diff --git a/ld/testsuite/ld-arm/attr-merge-6.attr b/ld/testsuite/ld-arm/attr-merge-6.attr
index 0af32f7751d..1ee5d40114b 100644
--- a/ld/testsuite/ld-arm/attr-merge-6.attr
+++ b/ld/testsuite/ld-arm/attr-merge-6.attr
@@ -5,5 +5,6 @@ File Attributes
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
+ Tag_ABI_FP_number_model: IEEE 754
Tag_MPextension_use: Allowed
Tag_Virtualization_use: TrustZone
diff --git a/ld/testsuite/ld-arm/attr-merge-6a.s b/ld/testsuite/ld-arm/attr-merge-6a.s
index 056d8c833a5..0423bbf3b21 100644
--- a/ld/testsuite/ld-arm/attr-merge-6a.s
+++ b/ld/testsuite/ld-arm/attr-merge-6a.s
@@ -1,4 +1,6 @@
.cpu cortex-a9
.fpu softvfp
+ .eabi_attribute 23, 3
+ .eabi_attribute 28, 0
.eabi_attribute 70, 1
.file "attr-merge-6a.s"
diff --git a/ld/testsuite/ld-arm/attr-merge-6b.s b/ld/testsuite/ld-arm/attr-merge-6b.s
index b9ef4d27995..9383bcc3383 100644
--- a/ld/testsuite/ld-arm/attr-merge-6b.s
+++ b/ld/testsuite/ld-arm/attr-merge-6b.s
@@ -1,3 +1,5 @@
.cpu cortex-a9
.fpu softvfp
+ .eabi_attribute 23, 3
+ .eabi_attribute 28, 3
.file "attr-merge-6b.s"