LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-08-2009, 08:36 AM   #1
Caesurus
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
Linking (ld) syntax and Floating Point crosscompile question


Hi,

I'm working on compiling some code from a vendor. They provide a library to link to which I presume was compiled with a gcc 2.9 cross compiler.

I'm having trouble understanding something. Any help or hints would be greatly appreciated. Here is the problem...

The library is supposedly compiled with hard-floating point:

Code:
$ arm-linux-gnu-objdump -p mylib.lib
mylib.lib:     file format elf32-littlearm
private flags = 0: [APCS-32] [FPA float format]
my driver .o files are compiled with soft-float

Code:
$ arm-linux-gnu-objdump -p sm_drv.o
sm_drv.o:     file format elf32-littlearm
private flags = 200: [APCS-32] [FPA float format] [software FP]
Now... when I try to link the two files I get the following, very understandable, error:

Code:
$ arm-linux-gnu-ld -r -o test.o sm_drv.o mylib.lib
arm-linux-gnu-ld: ERROR: mylib.lib uses hardware FP, whereas test.o uses software FP
arm-linux-gnu-ld: failed to merge target specific data of file mylib.lib
BUT... and here is what I don't understand, if I link as follows:
Code:
$ arm-linux-gnu-ld mylib.lib -r -o test.o sm_drv.o
I am able to link the two and the resulting test.o file is:

Code:
$ arm-linux-gnu-objdump -p test.o
test.o:     file format elf32-littlearm
private flags = 200: [APCS-32] [FPA float format] [software FP]
Why is this???

I appreciate the fact that I can ask the vendor to recompile the library for me with my toolchain and my compile flags, but that's not the question here.

Any clues would be greatly appreciated.

Thanks,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
floating point exception srkbapanapalli Linux - Newbie 1 03-26-2008 11:38 AM
Floating point exception ramesh6056 Linux - Software 1 05-29-2007 01:14 AM
floating point number vijraj Programming 2 03-07-2007 04:17 PM
floating point multiplication irfanhab Programming 0 12-23-2004 10:13 PM
managing floating point vince_2x Linux - General 2 09-21-2004 09:05 PM


All times are GMT -5. The time now is 08:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration