uBOOT 错误1

Re: [arm-gnu] In Function __aeabi_ldiv0 : undefined reference to 'raise'


  • To: ananth <ananth@xxxxxxx>
  • Subject: Re: [arm-gnu] In Function __aeabi_ldiv0 : undefined reference to 'raise'
  • From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
  • Date: Wed, 26 Nov 2008 13:22:10 -0800

ananth wrote:

> arm-2008q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/libgcc.a(_dvmd_lnx.o):
> In function `__aeabi_ldiv0':
> 
> (.text+0x8): undefined reference to `raise'

>       Can you please let me know for any linker flags to be changed for
> compiling the u-boot with this toolchain?

U-Boot is not a GNU/Linux application.  However, you're using the
GNU/Linux toolchain to compile it -- so the libraries assume the
presence of a GNU/Linux C library.  In this case, the division routine
wants to call "raise" to signal a division-by-zero exception.

People often try to abuse the GNU/Linux toolchain to build U-Boot
because they want to use the same toolchain that they use to build the
Linux kernel and GNU/Linux applications.  But, U-Boot is really a
bare-metal application, and, as such, should be built with a bare-metal
toolchain, like our "ARM EABI" toolchains.  There are often these kinds
of problems with U-Boot when moving between different architectures or
toolchain versions because the U-Boot source code has tricks to try to
make the GNU/Linux toolchain work, and those tricks only work with
particular toolchains.

That's the long story.

The short story is that you can probably provide an __aeabi_ldiv0
routine that just returns zero, overriding the default implementation.

-- 
Mark Mitchell
CodeSourcery
mark@xxxxxxxxxxxxxxxx
(650) 331-3385 x713
 
 
http://sourcery.mentor.com/archives/arm-gnu/msg02332.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值