Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Compiling for ARMv7 (Cortex-A8) in 6.5.0 with Floating Point: (3 Items)
   
Compiling for ARMv7 (Cortex-A8) in 6.5.0 with Floating Point  
I have read through the help document about building code for the Cortex-A8 in QNX, and have been mostly successful, 
however I still have a small problem with getting code containing floating point operations to run properly.

The help document in the QNX IDE seemed to imply that all armv7le code was compiled using the VFP instructions with no 
other libraries needed, such as the libm-vfb library that was needed in the older armle (v6) platform.

When I compile and run a section of code that has a floating point instruction I get this output at runtime: ldd:FATAL: 
Unresolved symbol "__aeabi_ul2f" called from Executable

I've tried all the different -m options that I can think of with all the vfp settings to modify the compiled code, but 
can't seem to get anything to work through this case.  It seems that my binary is looking for a piece of code in an 
external library, however, I don't know which library this could be.

The compile options I'm currently using are: 
CFLAGS			:=	-w9 -Wc,-Wall -fno-strict-aliasing -march=armv7-a -mtune=cortex-a8
CXXFLAGS		:=	-w9 -Wc,-Wall -fno-strict-aliasing -march=armv7-a -mtune=cortex-a8

Are there any -mfpu options that would make this work correctly?  I've tried all the ones I can find, but nothing 
changes the error output I get when my binary runs that piece of code.  This specific case looks like an unsigned long 
to floating point value conversion.

Thanks for the help,
--john
Re: Compiling for ARMv7 (Cortex-A8) in 6.5.0 with Floating Point  
On 11-10-03 02:51 PM, John Edwards wrote:
> I have read through the help document about building code for the Cortex-A8 in QNX, and have been mostly successful, 
however I still have a small problem with getting code containing floating point operations to run properly.
>
> The help document in the QNX IDE seemed to imply that all armv7le code was compiled using the VFP instructions with no
 other libraries needed, such as the libm-vfb library that was needed in the older armle (v6) platform.
>
> When I compile and run a section of code that has a floating point instruction I get this output at runtime: ldd:FATAL
: Unresolved symbol "__aeabi_ul2f" called from Executable
>
> I've tried all the different -m options that I can think of with all the vfp settings to modify the compiled code, but
 can't seem to get anything to work through this case.  It seems that my binary is looking for a piece of code in an 
external library, however, I don't know which library this could be.

__aeabi_ul2f is a libgcc function and is available in 
$QNX_HOST/usr/lib/gcc/arm-unknown-nto-qnx6.5.0eabi/4.4.2/libgcc.a. As 
the qcc/gcc drivers automatically link against libgcc, the only way for 
this to happen is if you link against a shared library which contains 
this libgcc function, and then the static linker doesn't pull in another 
copy from libgcc.a into your executable because it assumes that shared 
library will be available at runtime and provide the definition.  Check 
to make sure that the libraries you're linking against are the versions 
available on your target.

Regards,

Ryan Mansfield
Re: Compiling for ARMv7 (Cortex-A8) in 6.5.0 with Floating Point  
Thanks, I think I understand.  I will check this to make sure I'm using the armv7le shared objects.  I bet this is a 
case where I have them mismatched.