×
单片机 > 单片机程序设计 > 详情

ARM学习笔记010之Gcc编译新问题

发布时间:2024-05-20 发布时间:
|

之前的除法除不出来还没有解决,现在又有以下问题(在不添加raise函数的情况下):

网上说的原因是:


I'm getting the "relocation truncated to fit: R_ARM_PC24 against symbol" error message when linking, what does this mean?

You will get this error message when you are calling an external function that is too far for the ARM's branch and link instruction to reach. The maximum branch is +/- 32Mbytes in ARM mode and +/- 4Mbytes in Thumb mode.


You will typically get this when you have code placed into two memory segments that are located further apart than the maximum branch and link distance.


If the call is being made from C/C++ code then the solution is to either declare the function with the __long_call__attribute, for example:


详见:/zixunimg/eeworldimg/rowley.zendesk.com/entries/46203--relocation-truncated-to-fit-R-ARM-PC24-against-symbol-error-message

没有说解决之道


在两个重装的redhat5.1中都出现这样的问题,再在新装的redhat9.0上的gcc3.4.1上试试。redhat9.0上安装的是gcc而不是arm-linux-gcc,所以不行,出现了不应该有的错误。


『本文转载自网络,版权归原作者所有,如有侵权请联系删除』

热门文章 更多
浅谈AVR中定时器几种工作模式