mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-23 12:09:49 +00:00
ARM: Add support for value 3 of Tag_ABI_VFP_args attribute
*** bfd/ChangeLog *** 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. *** binutils/ChangeLog *** 2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * readelf.c (arm_attr_tag_ABI_VFP_args): Add "compatible". *** gdb/ChangeLog *** 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. *** gold/ChangeLog *** 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. *** include/elf/ChangeLog *** 2014-12-25 Thomas Preud'homme <thomas.preudhomme@arm.com> * arm.h: New AEABI_FP_number_model_* and AEABI_VFP_args_* enum values. *** ld/testsuite/ChangeLog *** 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.
This commit is contained in:
parent
d274fbe8a4
commit
5c294fee9a
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[] =
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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.
|
||||
|
14
gold/arm.cc
14
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);
|
||||
|
@ -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.
|
||||
|
@ -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. */
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -1,3 +1,5 @@
|
||||
.cpu cortex-a9
|
||||
.fpu softvfp
|
||||
.eabi_attribute 23, 3
|
||||
.eabi_attribute 28, 3
|
||||
.file "attr-merge-6b.s"
|
||||
|
Loading…
Reference in New Issue
Block a user