解决relocation truncated to fit: R_PPC_ADDR24 的问题

在尝试构建BootApp时遇到R_PPC_ADDR24重定位截断错误,修改BSP包makefile中RAM_HIGH_ADRS为0x08000000后,编译时出现问题。错误源于excConnectALib.o中的数据段重定位超出了24位有效地址限制。解决方案可能涉及检查汇编源码并调整地址,或者查阅相关资源如OpenBIOS邮件列表中的讨论。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

将BSP包makefile中的RAM_HIGH_ADRS 修改为 0x08000000

 

编译时会报以下错误:

intALib.o(.text+0x1fc): relocation truncated to fit: R_PPC_ADDR24 noActionIntEnt

详细问题表述见http://www.vxworksos.info/ae-problem-building-a-bootapp-with-ram_high_adrs-higher-than-0x03f00000

 

问题描述:

I’m trying to build a bootApp in Tornado AE of a custom BSP (A
modified version of ads860 BSP).  My board needs to have ROM_BASE_ADRS
= 0×00000000 and LOCAL_MEM_LOCAL_ADRS = 0×50000000.  I set
RAM_HIGH_ADRS = 0×50300000, RAM_LOW_ADRS = 0×50010000, ROM_TEXT_ADRS =
0×00000100 and ROM_SIZE = 0×00280000 in both 00bsp.cdf and makefile.
When I try to build the bootApp, I always received the following
error:

ldppc -X -e usrInit -Ttext 50300000 $/(PRJ_OBJS/) $/(bootKernel_OBJS/)
-o bootApp_reloc
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o: In function
`excConnectCode’:
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0×28):
relocation truncated to fit: R_PPC_ADDR24 excEnt
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0×34):
relocation truncated to fit: R_PPC_ADDR24 excExcHandle
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0x3c):
relocation truncated to fit: R_PPC_ADDR24 excExit
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0×48):
relocation truncated to fit: R_PPC_ADDR24 excEnt
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0×54):
relocation truncated to fit: R_PPC_ADDR24 excExcHandle
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0x5c):
relocation truncated to fit: R_PPC_ADDR24 excExit
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0×68):
relocation truncated to fit: R_PPC_ADDR24 excEnt
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0×74):
relocation truncated to fit: R_PPC_ADDR24 excExcHandle
C:/Tornado_AE/target/lib/objPPC860gnuvx/excConnectALib.o(.data+0x7c):
relocation truncated to fit: R_PPC_ADDR24 excExit

make[1]: *** [bootApp_reloc] Error 0×1
make[1]: Leaving directory `R:/bootApp/test_ads/PPC860gnu_romCopy’
make: Leaving directory `R:/bootApp/test_ads’
make: *** [bootApp_romCopy] Error 0×2

It seems that I cannot modified RAM_LOW_ADRS and RAM_HIGH_ADRS to be
higher than 0x03F00000 approximately.

Is their anyone that have an idea about the nature of my problem?

Thanks.

David

 

 

解决办法1:

My hunch is that the assembly language module excConnectALib.s, which sounds
like it provides support for connecting to the exception vectors in low
memory, uses instructions with 24-bit effective address operands. Relocating
the code where you did makes this exceed the 24 bits available to generate
the effective address.

If you have the source code, you should be able to see and possibly correct
the problem; otherwise, you are restricted to addresses below 0x00ffffff.

Out of curiosit

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值