This is the mail archive of the
mailing list for the GCC project.
Re: question about the usage of VFP register on arm
- From: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- To: junfeng dong <jfdong at gmail dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 9 Feb 2012 17:28:10 +0000
- Subject: Re: question about the usage of VFP register on arm
- References: <CAJEUoawvRzazs-fROKSW-jcf9bN9_6Gap5H7V50wySVjH-PsTQ@mail.gmail.com>
On Thu, Feb 09, 2012 at 11:13:39AM +0000, junfeng dong wrote:
> my arm cross compiler runs into an error like :
> ld: error: a.out uses VFP register arguments, /tmp/ccGm43Jh.o does not
> It seems ld requires all input files and output file has the same
> attribute of Tag_ABI_VFP_args, which is set by gcc in assembler file
> (.eabi_attribute 28, 1).
> but I didn't find the place where gcc cope with it. I wonder is this
> attribute controlled only by "-mfloat-abi"? -mfloat-abi=hard means "
> Tag_ABI_VFP_args=1" while -mfloat-abi=soft/softfp means "
> Tag_ABI_VFP_args=0"?is there any other compile option affect that
> Any comments are welcome.
You are correct -mfloat-abi changes the calling-convention used with
floating-point arguments (amongst other things), and thereby changes the
setting of Tag_ABI_VFP_args.
So you need to ensure that all objects you are linking together use the same
Principal Engineer, PD Software, ARM Ltd.