[U-Boot] "raise" not defined, when compiler uses its own div0
Ulf Samuelsson
ulf.samuelsson at atmel.com
Tue Aug 11 08:20:44 CEST 2009
When trying to build U-Boot under Buildroot and OpenEmbedded,
I run into a problem:
When linking u-boot the linker seems to use the div0 from
the C compiler libgcc instead of the u-boot div0.
gcc div0 for ARM contains a call to "raise" which is not defined
in libgcc.a (someone said it was part of glibc),
so the linking process fails due to no "raise" symbol
gcc/config/arm/lib1funcs.asm contains:
FUNC_START div0
tmfd sp!, {r1, lr}
mov r0, #SIGFPE
bl SYM(raise) __PLT__
...
The problem can be fixed by patching the C compiler:
+ bl SYM(raise) __PLT__
+ bl SYM(_div0) __PLT__
------
What I'd like to know: Is there a way to fix this in u-boot?
Tried creating a "raise" function in libarm/board.c
void raise(void)
{
hang();
}
which did not work.
I later saw that raise needs a parameter,
but it complained that raise is not found,
and not that the parameters is wrong.
Is board.c not included in the link?
Anyone else got this problem?
BR
Ulf Samuelsson
More information about the U-Boot
mailing list