分类: 嵌入式
2010-05-20 23:38:29
问题:
E:/Releasevx6.8/vxworks-6.8/target/h/tool/diab/ldscripts/link.DOTBOOTROM -o vxWorks_romCompress
dld: error: Section '.boot' extends over 32-bit address space limit
make[1]: *** [vxWorks_romCompress] Error 1
rm ipcom_ipdomain
make[1]: Leaving directory
怀疑跟代码长度相关,在rominit.s中增加一些代码就会出现这个错误,或者把其中原有的代码拷贝粘贴几次也会出现。
CPU:MPC8548
Ver:vxWorks6.8
答复:
In E500, boot process is from .reset section to .boot section, then to .text section.
.text section is your main source code.
.reset section and .boot section all is size limited.
.reset section only include 4 bytes. .boot setction default include 0x800 bytes.
Blow is the defination in link.DOTBOOTRAM:
.boot BIND(wrs_kernel_text_start + wrs_kernel_rom_size - 0x800) :
{
*(.boot)
}
.reset BIND(wrs_kernel_text_start + wrs_kernel_rom_size - 4) :
{
*(.reset)
}
According your test way, I copied these code 5 times. Then I disassemble file romInit.o. You can see the last function checkStop in .boot section address is 0x964, and over than 0x800. So compiler report over address space limit.
Disassembly of section .text:
00000000 <_romInit-0x100>:
...
00000100 <_romInit>:
100: 48 00 00 01 bl 100 <_romInit>
00000104
104: 48 00 00 41 bl 144
108: 57 69 6e 64 rlwinm r9,r27,13,25,18
10c: 20 52 69 76 subfic r2,r18,26998
......
2c4: 3c e0 00 00 lis r7,0
2c8: 60 e7 00 00 ori r7,r7,0
2cc: 3d 00 ff e0 lis r8,-32
2d0: 61 08 01 00 ori r8,r8,256
2d4: 7c c6 38 50 subf r6,r6,r7
2d8: 7c c6 42 14 add r6,r6,r8
2dc: 7c c8 03 a6 mtlr r6
2e0: 7c 43 13 78 mr r3,r2
2e4: 4e 80 00 20 blr
Disassembly of section .boot:
00000000 <_resetEntry>:
0: 7c c6 32 78 xor r6,r6,r6
4: 7c 00 04 ac sync
8: 4c 00 01 2c isync
c: 7c d2 fb a6 mtdbcr0 r6
10: 38 c0 00 02 li r6,2
......
00000964
964: 48 00 00 02 ba 0 <_resetEntry>
Disassembly of section .reset:
00000000
0: 48 00 00 00 b 0
If you have to add so much code in rominit.s, you can expand .boot section size in link.DOTBOOTRAM.