GCC編譯uboot出現(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'錯誤的解決的方法


/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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM