打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
undefined reference to `
undefined reference to `__aeabi_unwind_cpp_pr0' 问题解决办法
arm-none-linux-gnueabi/bin/ld: section .ARM.extab loaded at [00201008,00201013] overlaps section .data loaded at [00201008,0020103f]
at91sam9260ek.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
main.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
gpio.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
pmc.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
sdramc.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
nandflash.o:(.ARM.exidx+0x0): more undefined references to `__aeabi_unwind_cpp_pr0' follow
nandflash.o:(.ARM.exidx+0x18): undefined reference to `__aeabi_unwind_cpp_pr1'
div0.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
udiv.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
string.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
问题解决:arm-none-linux-gnueabi-gcc加上-nostdlib选项即可
机理
-nostdlib
不连接系统标准启动文件和标准库文件,只把指定的文件传递给连接器。
这个选项常用于编译内核、bootloader等程序,它们不需要启动文件、标准库文件。
C语言程序执行的第一条指令。并不是main函数。生产一个C程序的可执行文件时编译器通常会在我们的代码上加几个被称为启动文件的代码--crt1.o、crti.o、
crtend.o等,他们是标准库文件。这些代码设置C程序的堆栈等,然后调用main函数。他么依赖于操作系统,在裸板上无法执行,所以我们自己写一个。
问题已经找到答案了,我们自己写的crt0.S就是一个启动文件,他设置好堆栈后调用main函数。因此,我们不需要系统自带的启动文件。
关键词:
连接时出错:(.ARM.exidx 0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
undefined reference to `__aeabi_unwind_cpp_pr0'
连接时出错,(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
jmail.Message 错误 '8000ffff' 问题解决办法
用gcc编译.cpp文件可能出现"undefined reference to `__gxx_personality_v0'"问题的解决
怎样彻底解决"undefined reference to `pthread_create'"问题
文章点评:
精选专题
Laravel入门教程
Laravel是一套简洁、优雅的PHP Web开发框架(PHP Web Framework)。它可以让你从面条一样杂乱的代码中解脱出来;它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁、富于表达力。
hadoop学习及应用
Hadoop是一个由Apache基金会所开发的分布式系统基础架构。用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进行高速运算和存储。Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS放宽了(relax)POSIX的要求,可以以流的形式访问(streaming access)文件系统中的数据。Hadoop的框架最核心的设计就是:HDFS和MapReduce。HDFS为海量的数据提供了存储,则MapReduce为海量的数据提供了计算。
互联网产品设计
产品设计是互联网产品经理的核心能力,一个好的产品经理一定在产品设计方面有扎实的功底,本专题将从互联网产品设计的几个方面谈谈产品设计
产品经理职责
随着国内互联网的发展,产品经理岗位需求大幅增加,在国内,从事产品工作的大部分岗位为产品经理,其实现实中,很多从事产品工作的岗位是不能称为产品经理,主要原因是对产品经理的职责不明确,那产品经理的职责有哪些,本专题将详细介绍产品经理的主要职责
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
连接时出错,(.ARM.exidx+0x0):undefinedreferenceto `__aeabi_unwind_cpp_pr0'
关于编译时出现undefined reference to `
ubutu下编译简单的sqlite出错
example1.c:(.text+0x3d0): undefined reference to `cos'
用gcc编译.cpp文件可能出现"undefined reference to `__gxx_personality
X is not a member of ''''cv''''异常解决
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服