From: Richard Earnshaw Date: Wed, 16 Jan 2002 13:01:54 +0000 (+0000) Subject: * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96a846ea2324acd8d167080c146ebea148453aeb;p=binutils-gdb.git * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle EF_ARM_VFP_FLOAT. (elf32_arm_print_private_bfd_data): Likewise. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cb50b2ae9e6..f72c429cd1e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2002-01-16 Richard Earnshaw + + * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle + EF_ARM_VFP_FLOAT. + (elf32_arm_print_private_bfd_data): Likewise. + 2002-01-16 Nick Clifton * po/tr.po: Import new version. diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index 9d0a405a829..ab8a6b3a432 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -2297,22 +2297,47 @@ Error: %s passes floats in integer registers, whereas %s passes them in FP regis flags_compatible = false; } -#ifdef EF_ARM_SOFT_FLOAT - if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT)) + if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT)) { - if (in_flags & EF_ARM_SOFT_FLOAT) - _bfd_error_handler (_ ("\ -Error: %s uses software FP, whereas %s uses hardware FP"), + if (in_flags & EF_ARM_VFP_FLOAT) + _bfd_error_handler (_("\ +Error: %s uses VFP instructions, whereas %s FPA instructions"), bfd_archive_filename (ibfd), bfd_get_filename (obfd)); else - _bfd_error_handler (_ ("\ -Error: %s uses hardware FP, whereas %s uses software FP"), + _bfd_error_handler (_("\ +Error: %s uses FPA instructions, whereas %s VFP instructions"), bfd_archive_filename (ibfd), bfd_get_filename (obfd)); flags_compatible = false; } + +#ifdef EF_ARM_SOFT_FLOAT + if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT)) + { + /* We can allow interworking between code that is VFP format + layout, and uses either soft float or integer regs for + passing floating point arguments and results. We already + know that the APCS_FLOAT flags match; similarly for VFP + flags. */ + if ((in_flags & EF_ARM_APCS_FLOAT) != 0 + || (in_flags & EF_ARM_VFP_FLOAT) == 0) + { + if (in_flags & EF_ARM_SOFT_FLOAT) + _bfd_error_handler (_ ("\ +Error: %s uses software FP, whereas %s uses hardware FP"), + bfd_archive_filename (ibfd), + bfd_get_filename (obfd)); + else + _bfd_error_handler (_ ("\ +Error: %s uses hardware FP, whereas %s uses software FP"), + bfd_archive_filename (ibfd), + bfd_get_filename (obfd)); + + flags_compatible = false; + } + } #endif /* Interworking mismatch is only a warning. */ @@ -2374,6 +2399,11 @@ elf32_arm_print_private_bfd_data (abfd, ptr) else fprintf (file, _(" [APCS-32]")); + if (flags & EF_ARM_VFP_FLOAT) + fprintf (file, _(" [VFP float format]")); + else + fprintf (file, _(" [FPA float format]")); + if (flags & EF_ARM_APCS_FLOAT) fprintf (file, _(" [floats passed in float registers]")); @@ -2389,8 +2419,9 @@ elf32_arm_print_private_bfd_data (abfd, ptr) if (flags & EF_ARM_SOFT_FLOAT) fprintf (file, _(" [software FP]")); - flags &= ~(EF_ARM_INTERWORK | EF_ARM_APCS_26 | EF_ARM_APCS_FLOAT | EF_ARM_PIC - | EF_ARM_NEW_ABI | EF_ARM_OLD_ABI | EF_ARM_SOFT_FLOAT); + flags &= ~(EF_ARM_INTERWORK | EF_ARM_APCS_26 | EF_ARM_APCS_FLOAT + | EF_ARM_PIC | EF_ARM_NEW_ABI | EF_ARM_OLD_ABI + | EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT); break; case EF_ARM_EABI_VER1: