Using two versions of the same function

You can have two functions with the same name, one compiled for ARM and the other for Thumb.

The linker enables multiple definitions of a symbol to coexist in an image, only if each definition is associated with a different processor state. The linker applies the following rules when a reference is made to a symbol with ARM/Thumb synonyms:

Any other reference to the symbol resolves to the first definition encountered by the linker. The linker produces a warning that specifies the chosen symbol.

Note

Defining the same function name or symbol name in ARM code and in Thumb code is deprecated.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0471G
Non-ConfidentialID021412