Warning[25]: Label 'xxxxx' is defined pubweak in a section implicitly declared root

基于创建STM32工程时编译会出现大量警告,参考IAR官网解决方法:

https://www.iar.com/support/tech-notes/assembler/warning25-label-xxxxx-is-defined-pubweak-in-a-section-implicitly-declared-root/


Technical Note 30605

Targets:
ARM, STM8

Component:
Assembler

Updated:
2015/9/3 13:18

Introduction

After upgrading to version 7.10.1 (or later) of IAR Embedded Workbench for ARM or to version 2.10.1 (or later) of IAR Embedded Workbench for STM8 a message similar to

Warning[25]:Label'xxxxx'isdefined pubweak in a section implicitly declared root

might  be issued during assembly, even though there were no such warnings in earlier version(s).

Discussion

The IAR Assembler is issuing the warning for a deprecated assembler construction where an implicit :ROOT flag is inconsistent with how PUBWEAK is used.

As an example, consider these lines:

     PUBWEAK NMI_Handler 
     SECTION .text:CODE:REORDER(1)
NMI_Handler 

In this, and most other cases, you should add a :NOROOT flag to remove the inconsistency and avoid the warning.

The syntax for the assembler directive SECTION is:

     SECTION  section :type [:flag][(align)]

More information can be found in the IAR Assembler Reference Guide, Section control directives.

Conclusion

In most cases, adding :NOROOT to the SECTION control directive is a good way to remove the deprecated construct and avoid the warning message: 

      PUBWEAK NMI_Handler 
      SECTION .text:CODE:REORDER:NOROOT(1)
NMI_Handler 

 

All product names are trademarks or registered trademarks of their respective owners.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值