public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ulf Samuelsson <ulf.samuelsson@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] "raise" not defined, when compiler uses its own div0
Date: Tue, 11 Aug 2009 08:20:44 +0200	[thread overview]
Message-ID: <4A810DBC.50805@atmel.com> (raw)

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

             reply	other threads:[~2009-08-11  6:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11  6:20 Ulf Samuelsson [this message]
2009-08-11  8:14 ` [U-Boot] "raise" not defined, when compiler uses its own div0 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A810DBC.50805@atmel.com \
    --to=ulf.samuelsson@atmel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox