- To: junfeng dong <jfdong@xxxxxxxxx>
- Subject: Re: question about the usage of VFP register on arm
- From: Matthew Gretton-Dann <matthew.gretton-dann@xxxxxxx>
- Date: Thu, 9 Feb 2012 17:28:10 +0000
- Cc: "gcc-help@xxxxxxxxxxx" <gcc-help@xxxxxxxxxxx>
- Comment: DKIM? See http://www.dkim.org
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329413324; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References: MIME-Version:In-Reply-To:User-Agent:Content-Type: Content-Transfer-Encoding:Content-Disposition:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=2ganLmKluNgoDmJSpyDhIfZ4qH0=; b=QZ3nKh8V+NTQO7vKKrhvRr0KB91FGxeRkMb1XrLu4VC63j6PA6vm+B82ySpkki vwVhkUaxHhOSkJHPPgG9+gsRuL3+On5o9Hn0UcYKm2vvAzdoK5v3L80R89WMQghh RwSPW/dC8l73bnmSfOHzuHB7SxbdEzrVJZ+H8pf/BMeWc=
- In-reply-to: <CAJEUoawvRzazs-fROKSW-jcf9bN9_6Gap5H7V50wySVjH-PsTQ@mail.gmail.com>
- Mail-followup-to: junfeng dong <jfdong@xxxxxxxxx>, "gcc-help@xxxxxxxxxxx" <gcc-help@xxxxxxxxxxx>
- User-agent: Mutt/1.5.20 (2009-06-14)
On Thu, Feb 09, 2012 at 11:13:39AM +0000, junfeng dong wrote:
> Hi,
> 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
> attribute?
> 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
calling-convention.
Thanks,
Matt
--
Matthew Gretton-Dann
Principal Engineer, PD Software, ARM Ltd.
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]