GCC编译uboot出现(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'错误的解决办法

时间:2022-07-09 14:47:35

/opt/arm-2010.09/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/armv4t/libgcc.a(_bswapsi2.o):(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
make: *** [u-boot] Error 1

一旦编译uboot出现上述错误,请不要慌张!解决办法官网已经给出,主要解决办法如下:

vim 打开./lib_arm/eabi_compat.c(具体的位置根据自己的情况而定)并添加如下空函数即可解决:

/* Dummy function to avoid linker complaints */

void __aeabi_unwind_cpp_pr0(void)

{

};

 

以下为官网原内容:

[U-Boot] [PATCH] ARM: add __aeabi_unwind_cpp_pr0() function to avoid linker complaints

Wolfgang Denk     wd at denx.de       
Mon May 10 23:08:02 CEST 2010    


Signed-off-by: Wolfgang Denk <wd at denx.de>
---
arch/arm/lib/eabi_compat.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/lib/eabi_compat.c b/arch/arm/lib/eabi_compat.c
index 86eacf1..eb3e26d 100644
--- a/arch/arm/lib/eabi_compat.c
+++ b/arch/arm/lib/eabi_compat.c
@@ -16,3 +16,8 @@ int raise (int signum)
printf("raise: Signal # %d caught\n", signum);
return 0;
}
+
+/* Dummy function to avoid linker complaints */
+void __aeabi_unwind_cpp_pr0(void)
+{
+};
--
1.6.6.1