This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Set F_VFP_FLOAT for any binary not using FPA instructions
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- To: rearnshaw at cambridge dot arm dot com
- Cc: binutils at sources dot redhat dot com
- Date: 16 Apr 2002 07:47:38 +0100
- Subject: Set F_VFP_FLOAT for any binary not using FPA instructions
Hi Richard,
Any objections to my applying the following patch ? It changes the
logic for setting the F_VFP_FLOAT flag in arm-elf binaries so that
it is set for any binary that has been created without enabling FPA
instructions - even binaries that have been assembled with the
-mno-fpu switch. This is the change from the previous behavior
where assembling with -mno-fpu would not set the VFP flag.
The reason for this change to get around the problem of compiling
source files with the gcc switches "-mcpu=xscale -msoft-float".
Although the soft-float flag is redundant, specifying it passes the
-mno-fpu flag to the assembler, which then marks the binaries as
using FPA instructions. This then prevents the object file from
being linked with other arm or xscale binaries, which by default are
marked as using VFP instructions.
It also has the side effect of making the code agree with the
comment above it. :-)
Cheers
Nick
2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
* config/tc-arm.c (md_begin): Set F_VFP_FLOAT for any binaries not
using FPA instructions.
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.117
diff -c -3 -p -w -r1.117 tc-arm.c
*** gas/config/tc-arm.c 21 Mar 2002 09:13:34 -0000 1.117
--- gas/config/tc-arm.c 16 Apr 2002 06:41:58 -0000
*************** md_begin ()
*** 9237,9244 ****
|| (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only. */
flags |= F_SOFT_FLOAT;
/* Using VFP conventions (even if soft-float). */
! if (cpu_variant & FPU_VFP_EXT_NONE) flags |= F_VFP_FLOAT;
!
bfd_set_private_flags (stdoutput, flags);
--- 9237,9244 ----
|| (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only. */
flags |= F_SOFT_FLOAT;
/* Using VFP conventions (even if soft-float). */
! if (! (cpu_variant & (FPU_FPA_EXT_V1 | FPU_FPA_EXT_V2)))
! flags |= F_VFP_FLOAT;
bfd_set_private_flags (stdoutput, flags);