s3c6410裸机实验-错误汇总

  • 错误一

<span style="font-family:SimSun;">main.o:(.ARnostdlibM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
mmu.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
mmu.o:(.ARM.exidx+0x10): undefined reference to `__aeabi_unwind_cpp_pr1'
leds.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
button.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
interrupt.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
interrupt.o:(.ARM.exidx+0x10): undefined reference to `__aeabi_unwind_cpp_pr0'
nand.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
nand.o:(.ARM.exidx+0x28): undefined reference to `__aeabi_unwind_cpp_pr1'
uart.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
uart.o:(.ARM.exidx+0x10): undefined reference to `__aeabi_unwind_cpp_pr1'
lib/lib.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr1'
lib/lib.o:(.ARM.exidx+0x8): undefined reference to `__aeabi_unwind_cpp_pr1'
lib/lib.o:(.ARM.exidx+0x10): undefined reference to `__aeabi_unwind_cpp_pr0'
lib/lib.o:(.ARM.exidx+0x18): undefined reference to `__aeabi_unwind_cpp_pr1'
lib/lib.o:(.ARM.exidx+0xd0): undefined reference to `__aeabi_unwind_cpp_pr0'
lib/lib.o:(.ARM.exidx+0xd8): undefined reference to `__aeabi_unwind_cpp_pr1</span>

解决方法:在 arm-linux-gcc 后加入-nostdlib选项 

-nostdlib
不连接系统标准启动文件和标准库文件,只把指定的文件传递给连接器。这个选项常用于编译内核、bootloader等程序,它们不需要启动文件、标准库文件。


  • 错误二
<span style="font-family:SimSun;">main.c:23: warning: incompatible implicit declaration of built-in function 'printf'
uart.c:20: warning: conflicting types for built-in function 'putchar'
make[1]: Entering directory `/home/edward/ok6410/uboot/lib'
printf.c: In function 'printf':
printf.c:14: warning: incompatible implicit declaration of built-in function 'strlen'</span>

解决方法:在arm-linux-gcc 后加-fno-builtin选项
出现这个问题的原因是自己实现的函数名字与内联的函数名相冲突




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值