diff options
author | Nick Clifton <nickc@redhat.com> | 2012-10-30 12:44:58 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2012-10-30 12:44:58 +0000 |
commit | 3bfcb6528e6fb6a324b2e119f50f72a0674a1402 (patch) | |
tree | d9395ca1bd3a2389a2833f97550a714da9b1d59d /gold | |
parent | b1bd052dee559a2b5f09a0e8b1e4d4e45d38f39f (diff) | |
download | gdb-3bfcb6528e6fb6a324b2e119f50f72a0674a1402.zip gdb-3bfcb6528e6fb6a324b2e119f50f72a0674a1402.tar.gz gdb-3bfcb6528e6fb6a324b2e119f50f72a0674a1402.tar.bz2 |
bfd:
* elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and
display the new ARM hard-float/soft-float ABI flags for EABI_VER5
(elf32_arm_post_process_headers): Add the hard-float/soft-float
ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5.
binutils:
* readelf.c (decode_ARM_machine_flags): Recognise and display the
new ARM hard-float/soft-float ABI flags for EABI_VER5. Split out
the code for EABI_VER4 and EABI_VER5 to allow this.
elfcpp:
* arm.h: New enum for EABI soft- and hard-float flags.
gold:
* gold.cc (Target_arm::do_adjust_elf_header): Add the
hard-float/soft-float ABI flag as appropriate for ET_DYN/ET_EXEC
in EABI_VER5.
include:
* elf/arm.h (EF_ARM_ABI_FLOAT_SOFT): New define.
(EF_ARM_ABI_FLOAT_HARD): Likewise.
ld/testsuite:
* ld-arm/eabi-hard-float.s: New test source.
* ld-arm/eabi-soft-float.s: New test source.
* ld-arm/eabi-hard-float.d: New test.
* ld-arm/eabi-soft-float.d: New test.
* ld-arm/eabi-soft-float-ABI4.d: New test.
* ld-arm/eabi-soft-float-r.d: New test.
* ld-arm/arm-elf.xp: Use the new tests.
binutils:
PR binutils/14779
* configure.in: Add checks for wchar.h and mbstate_t.
* config.in: Regenerate.
* configure: Regenerate.
* readelf.c: Conditionally include wchar.h.
(print_symbol): Conditionally use mbstate_t.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 6 | ||||
-rw-r--r-- | gold/arm.cc | 22 |
2 files changed, 25 insertions, 3 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 57c7cc3..60e2d49 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2012-10-30 Steve McIntyre <steve.mcintyre@linaro.org> + + * gold.cc (Target_arm::do_adjust_elf_header): Add the + hard-float/soft-float ABI flag as appropriate for ET_DYN/ET_EXEC + in EABI_VER5. + 2012-10-29 Cary Coutant <ccoutant@google.com> * dwp.cc (usage): Add file and exit status parameters; diff --git a/gold/arm.cc b/gold/arm.cc index d847126..5770c8a 100644 --- a/gold/arm.cc +++ b/gold/arm.cc @@ -2476,7 +2476,7 @@ class Target_arm : public Sized_target<32, big_endian> { return new Arm_output_section<big_endian>(name, type, flags); } void - do_adjust_elf_header(unsigned char* view, int len) const; + do_adjust_elf_header(unsigned char* view, int len); // We only need to generate stubs, and hence perform relaxation if we are // not doing relocatable linking. @@ -10016,15 +10016,16 @@ template<bool big_endian> void Target_arm<big_endian>::do_adjust_elf_header( unsigned char* view, - int len) const + int len) { gold_assert(len == elfcpp::Elf_sizes<32>::ehdr_size); elfcpp::Ehdr<32, big_endian> ehdr(view); + elfcpp::Elf_Word flags = this->processor_specific_flags(); unsigned char e_ident[elfcpp::EI_NIDENT]; memcpy(e_ident, ehdr.get_e_ident(), elfcpp::EI_NIDENT); - if (elfcpp::arm_eabi_version(this->processor_specific_flags()) + if (elfcpp::arm_eabi_version(flags) == elfcpp::EF_ARM_EABI_UNKNOWN) e_ident[elfcpp::EI_OSABI] = elfcpp::ELFOSABI_ARM; else @@ -10033,6 +10034,21 @@ Target_arm<big_endian>::do_adjust_elf_header( // FIXME: Do EF_ARM_BE8 adjustment. + // If we're working in EABI_VER5, set the hard/soft float ABI flags + // as appropriate. + if (elfcpp::arm_eabi_version(flags) == elfcpp::EF_ARM_EABI_VER5) + { + elfcpp::Elf_Half type = ehdr.get_e_type(); + 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()) + flags |= elfcpp::EF_ARM_ABI_FLOAT_HARD; + else + flags |= elfcpp::EF_ARM_ABI_FLOAT_SOFT; + this->set_processor_specific_flags(flags); + } + } elfcpp::Ehdr_write<32, big_endian> oehdr(view); oehdr.put_e_ident(e_ident); } |