"Label 'xxxxx' is defined pubweak in a section implicitly declared root" 경고문

기술노트 30605

아키텍처:

ARM, STM8

컴포넌트:

assembler

업데이트:

2018-02-28 오전 1:44

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' is defined 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.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.