4.7 Symbol naming rules

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

Symbol naming rules which are common to both ARM 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 ARM syntax and GNU syntax include:
  • ARM 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 ".".
  • ARM 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
Related information
GNU Binutils - Using as: Symbol Names
armasm User Guide: Symbol naming rules
Non-ConfidentialPDF file icon PDF versionARM DUI0742F
Copyright © 2014-2016 ARM. All rights reserved.