Keil Logo

Symbol naming rules

5.8 Symbol naming rules

armasm syntax assembly code and GNU syntax assembly code use similar, but different naming rules for symbols.

Symbol naming rules which are common to both armasm syntax and GNU syntax include:

  • Symbol names must be unique within their scope.
  • Symbol names are case-sensitive, and all characters in the symbol name are significant.
  • Symbols must not use the same name as built-in variable names or predefined symbol names.

Symbol naming rules which differ between armasm syntax and GNU syntax include:

  • armasm syntax symbols must start with a letter or the underscore character "_".

    GNU syntax symbols must start with a letter, the underscore character "_", or a period ".".

  • armasm syntax symbols use double bars to delimit symbol names containing non-alphanumeric characters (except for the underscore):

    IMPORT ||Image$$ARM_LIB_STACKHEAP$$ZI$$Limit||

    GNU syntax symbols do not require double bars:

    .global Image$$ARM_LIB_STACKHEAP$$ZI$$Limit

Non-ConfidentialPDF file icon PDF version100068_0613_00_en
Copyright © 2014–2019 Arm Limited or its affiliates. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.