[U-Boot] undefined reference to `abort'

Shadid, Bill wshadid at neptec.com
Mon Dec 5 19:13:29 CET 2011


I've added a test suite to the build that can be accessed while at the u-boot prompt. The suite allows folks to verify various h/w components without running an OS. The suite contains some algorithms to convert sensor data to voltage, current, power and temperature. I can modify some of these calculations to use integer math instead but in 1 case there is a polynomial with larger exponents. I'm almost ready to give up, so this is my last stab at resolving the issue.

Its surprising that this code compiled and ran fine with ELDK 4.0 but has compile issues with 4.2. I guess some floating-point support was removed. I'm still not clear why the abort function is called and I say called because when we do throw in our own abort function that calls printf or forever loops, its gets executed and hangs u-boot.

Thanks for your help,
Bill.

-----Original Message-----
From: Matthias Weißer [mailto:m.weisser.m at googlemail.com] 
Sent: December 5, 2011 12:57 PM
To: Mike Frysinger
Cc: u-boot at lists.denx.de; Shadid, Bill
Subject: Re: [U-Boot] undefined reference to `abort'

Am 05.12.2011 18:28, schrieb Mike Frysinger:
> On Monday 05 December 2011 11:43:09 Shadid, Bill wrote:
>> /opt/embedded/tools/usr/bin/../lib/gcc/powerpc-linux/4.2.2/m8540/libg
>> cc.a(d
>> ivsf3.o): In function `__divsf3':
>> /opt/eldk/build/ppc-2008-04-01/work/usr/src/denx/BUILD/crosstool-0.43
>> /buil 
>> d/gcc-4.2.2-glibc-20070515T2025-eldk/powerpc-linux/gcc-4.2.2/gcc/conf
>> ig/sof
>> t-fp/divsf3.c:44: undefined reference to `abort'
> 
> looks like you should be using a diff cross-compiler.  or ppc should 
> grow private libgcc support.
> -mike

Or just don't use any floating point operations in a bootloader. There seems to be some usages of floats around in u-boot but most (all?) of them are compile time calculations.

Just curious: Bill, what is the use case for float at runtime?

Matthias


More information about the U-Boot mailing list