From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ulf Samuelsson Date: Tue, 11 Aug 2009 08:20:44 +0200 Subject: [U-Boot] "raise" not defined, when compiler uses its own div0 Message-ID: <4A810DBC.50805@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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