From cd49363b8ae1725522ea29ccc0dda7b138f3d5aa Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 30 Oct 2012 12:44:53 +0000 Subject: 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. --- bfd/elf32-arm.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'bfd/elf32-arm.c') diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 633bb648a7..fefc7db0c1 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -12110,6 +12110,15 @@ elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr) case EF_ARM_EABI_VER5: fprintf (file, _(" [Version5 EABI]")); + + if (flags & EF_ARM_ABI_FLOAT_SOFT) + fprintf (file, _(" [soft-float ABI]")); + + if (flags & EF_ARM_ABI_FLOAT_HARD) + fprintf (file, _(" [hard-float ABI]")); + + flags &= ~(EF_ARM_ABI_FLOAT_SOFT | EF_ARM_ABI_FLOAT_HARD); + eabi: if (flags & EF_ARM_BE8) fprintf (file, _(" [BE8]")); @@ -14417,6 +14426,16 @@ elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT if (globals != NULL && globals->byteswap_code) i_ehdrp->e_flags |= EF_ARM_BE8; } + + if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_VER5 + && ((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) + i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_HARD; + else + i_ehdrp->e_flags |= EF_ARM_ABI_FLOAT_SOFT; + } } static enum elf_reloc_type_class -- cgit v1.2.1