s3c6410裸机实验-错误汇总

来源:互联网 发布:手机淘宝客服步骤 编辑:程序博客网 时间:2024/05/09 17:30

  • 错误一

<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选项
出现这个问题的原因是自己实现的函数名字与内联的函数名相冲突




0 0
原创粉丝点击