Chinaunix首页 | 论坛 | 博客
  • 博客访问: 588815
  • 博文数量: 169
  • 博客积分: 2656
  • 博客等级: 少校
  • 技术积分: 1685
  • 用 户 组: 普通用户
  • 注册时间: 2009-07-30 13:03
文章分类

全部博文(169)

文章存档

2011年(1)

2010年(135)

2009年(33)

我的朋友

分类: 嵌入式

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


E:\Releasevx6.8\utilities-1.0\x86-win32\bin\make.exe: *** [target_vxWorks] Error 2


怀疑跟代码长度相关,在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.

阅读(2230) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~