public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] "raise" not defined, when compiler uses its own div0
@ 2009-08-11  6:20 Ulf Samuelsson
  2009-08-11  8:14 ` Gaye Abdoulaye Walsimou
  2009-08-11  8:47 ` Wolfgang Denk
  0 siblings, 2 replies; 9+ messages in thread
From: Ulf Samuelsson @ 2009-08-11  6:20 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-08-13  4:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11  6:20 [U-Boot] "raise" not defined, when compiler uses its own div0 Ulf Samuelsson
2009-08-11  8:14 ` Gaye Abdoulaye Walsimou
2009-08-11  8:48   ` Wolfgang Denk
2009-08-11  8:47 ` Wolfgang Denk
2009-08-11 21:48   ` Ulf Samuelsson
2009-08-11 21:58     ` Wolfgang Denk
2009-08-12  6:22       ` Ulf Samuelsson
2009-08-12 12:04         ` Wolfgang Denk
2009-08-13  4:55           ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox