当前位置:网站首页>解决undefined reference to `__aeabi_uidivmod‘和undefined reference to `__aeabi_uidiv‘错误
解决undefined reference to `__aeabi_uidivmod‘和undefined reference to `__aeabi_uidiv‘错误
2022-07-03 09:48:00 【smartvxworks】
自己写裸机驱动程序时,使用了除法,在链接的时候出了如下错误:
使用的编译器是:
后来上网搜了一下原因,由于编译器不支持除法运算,但是也没有搜到解决方案。看了一下代码确实用到了除法,把除法去掉可以正常连接通过。后来想了想了,之前编译内核和编译u_boot都是这个编译器的呀,他们肯定有除法运算呀,他们是怎么做到的呢?
于是看了一下u_boot的Makefile,很晕,东西很多,后来编译了一下,看到了这个:
u_boot在链接的时候,指定了黄色颜色的路径和-lgcc选项(-l后面的是链接库的名字)
到指定的目录下看到如下内容:
里面有一个libgcc.a的静态库,编译器支持软浮点,猜想软浮点的实现应该就是在找个静态库中。
在自己的Makefile里面加上了这些东西,继续编译连接出现如下错误信息:
缺少"raise符号",在u_boot源码中搜索"raise"如下:
是一个函数,什么也没干,我在自己的代码中写了一个这样的空函数,编译通过。
Makefile 如下:
总结:
ARMv4t的ARM核不支持浮点运算,为了让其支持浮点运算,编译器使用了软浮点的方法,但是需要相应的除法库支持,在连接的时候需要指定其路径和库名。
一句经典名言: 在IT行业,遇到问题,只要一直解决,总有解决的一天。
边栏推荐
- UI自动化测试如何走出困境?价值又如何体现?
- Summary of the history of Mathematics
- What experience is there only one test in the company? Listen to what they say
- What is the salary level of 17k? Let's take a look at the whole interview process of post-95 Test Engineers
- T5 attempt
- Comment réaliser des tests automatisés pour les tests logiciels embarqués?
- Crawl with requests
- 软件测试工程师的5年之痒,讲述两年突破瓶颈经验
- Test what the leader should do
- 值得关注的15种软件测试趋势
猜你喜欢
MAUI Developer Day in GCR
"Core values of testing" and "super complete learning guide for 0 basic software testing" summarized by test engineers for 8 years
Cache routing component
《通信软件开发与应用》
Activity and fragment lifecycle
栈,单调栈,队列,单调队列
EPS电动转向系统分析
What kind of living condition is a tester with a monthly salary of more than 10000?
17K薪资要什么水平?来看看95后测试工程师的面试全过程…
测试理论概述
随机推荐
在职美团测试工程师的这八年,我是如何成长的,愿技术人看完都有收获
I, a tester from a large factory, went to a state-owned enterprise with a 50% pay cut. I regret it
栈,单调栈,队列,单调队列
Overview of testing theory
How to realize automatic testing in embedded software testing?
Qt:qss custom qradiobutton instance
反正切熵(Arctangent entropy):2022.7月最新SCI论文
Small file special
ByteDance layoffs, test engineers were almost destroyed: how terrible is the routine behind the recruitment of large factories?
游戏测试相关 测试一个英雄的技能(春招被问比较多的一道题)
“测试人”,有哪些厉害之处?
Programming examples of stm32f1 and stm32subeide -tm1637 drives 4-bit 7-segment nixie tubes
The solution that prompts "system group policy prohibits the installation of this device" under win10 system (home version has no group policy)
Basic usage of sqlmap
How can UI automated testing get out of trouble? How to embody the value?
redis那些事儿
Activity and fragment lifecycle
年中了,准备了少量的自动化面试题,欢迎来自测
First line of code kotlin notes
QT:QSS自定义QLineEdit实例