Taking RISC-V to the next level!

IAR Embedded Workbench for RISC-V now released

Tools for Risc-V

Label 'xxxxx' is defined pubweak in a section implicitly declared root

Technical Note 30605



9/3/2015 11:18 AM


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).


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 

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.


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 


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

Related Tech Notes

© IAR Systems 1995-2019 - All rights reserved.

We use cookies on this website to provide you with a better experience. You need to accept cookies to continue using this site. Cookies