4.1. About interworking

Interworking enables you to mix ARM and Thumb code so that:

This means that, if you compile or assemble code for interworking, your code can call a routine in a different module without considering which instruction set it uses.

The ARM linker detects when an ARM function is being called from Thumb state, or a Thumb function is being called from ARM state. The ARM linker changes call and return instructions, or inserts small code segments called veneers, to change processor state as necessary.

The ARMv5T and later architectures provide methods to change processor state without using any extra instructions. There is normally no cost associated with interworking on ARMv5T processors.


Compiling for ARMv5TE and later automatically assumes interworking, and always produces code that interworks. However, assembly code built for ARMv5TE does not imply interworking, so you must build assembly code with the --apcs /interwork assembler option.

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