Keil Logo


12.4 ALIAS

The ALIAS directive creates an alias for a symbol.


ALIAS name, aliasname
is the name of the symbol to create an alias for.
is the name of the alias to be created.


The symbol name must already be defined in the source file before creating an alias for it. Properties of name set by the EXPORT directive are not inherited by aliasname, so you must use EXPORT on aliasname if you want to make the alias available outside the current source file. Apart from the properties set by the EXPORT directive, name and aliasname are identical.

Correct example

bar PROC
    BX lr
    ALIAS  bar,foo    ; foo is an alias for bar
    EXPORT bar
    EXPORT foo        ; foo and bar have identical properties 
                      ; because foo was created using ALIAS
    EXPORT baz        ; baz and bar are not identical 
                      ; because the size field of baz is not set

Incorrect example

    EXPORT bar
    IMPORT car
    ALIAS  bar,foo ; ERROR - bar is not defined yet
    ALIAS  car,boo ; ERROR - car is external
bar PROC
    BX lr
Related reference
Non-ConfidentialPDF file icon PDF versionARM DUI0379H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. 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.