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 compiler and assembler both use the --apcs=/interwork command-line option to enable interworking.

You can freely mix code compiled or assembled for ARM and Thumb, provided that the code conforms to the AAPCS.

An error is generated if the linker detects:

The ARM linker detects when an interworking function is being called from a different state. Call and return instructions are changed, and small code segments called veneers, are inserted to change processor state where necessary.

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


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

Show/hideSee also


Assembler Reference:

Linker Reference:

Other information
Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0471G