U-boot-1.1.6-2008R1到vdsp5(bf561)的移植记录(11):bsz

 
  
在VDSP程序中,有一个叫做bsz的段,其含义是
Controls placement of zero-initialized variable data
其实就是相当于u-boot.lds.s中的.bss段,所以我们可以将这个段放在.bss段中。
       .bss
       {
         INPUT_SECTION_ALIGN(4)
              __bss_start = .;
              INPUT_SECTIONS($LIBRARIES_UBOOT(.sbss) $LIBRARIES_UBOOT(.scommon))
              INPUT_SECTIONS($LIBRARIES_UBOOT(.dynbss))
              INPUT_SECTIONS($LIBRARIES_UBOOT(.bss))
              INPUT_SECTIONS($LIBRARIES_UBOOT(bsz))
              INPUT_SECTIONS($LIBRARIES_UBOOT(COMMON))
              __bss_end = .;
       } > MEM_SDRAM
当然,这样做会引起链接器的一个警告:
[Warning li2131] "./u-boot.ldf":687 Input section(s) of incompatible init qualifier detected in the output section '.bss'
For more details, see 'linker_log.xml' in the output directory.
Li2131的解释是:
A section qualifier can be specified for an output section. The input sections mapped into the qualified output section should have a compatible initialization qualifier. The linker warns you if:
 
The section qualifier is not compatible with an initialization qualifier on an input section.
 
A section qualifier is on the output section and an input section without a qualifier is mapped into it.
 
No section qualifier is on the output section and an input section with a qualifier is mapped into it.
 
Section qualifiers that can be used in the .ldf file to qualify output sections are:
 
NO_INIT
 
ZERO_INIT
 
RUNTIME_INIT
 
SHT_NOBITS
引起这个警告的原因在于bsz段应该使用ZERO_INIT来进行修饰,当然,由于我们将这个段放在.bss中,在start.s中会对这个段中的数据清0,也可以达到同样的效果,所以尽可以忽略这个警告。
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

嵌云阁主

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值