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

ARM/Thumb synonyms

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:

  • B, BL, or BLX instructions to a symbol from ARM state resolve to the ARM definition

  • B, BL, or BLX instructions to a symbol from Thumb state resolve to the Thumb definition.

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.

Copyright © 2002-2006 ARM Limited. All rights reserved.ARM DUI 0203G
Non-Confidential