User guide

Thumb subroutines that might make indirect or virtual calls to ARM code
ARM subroutines that might make indirect or virtual calls to Thumb code.
Otherwise, you do not need to use the /interwork option. For example, your object file may contain any of the
following without requiring /interwork:
Thumb code that may be interrupted by an exception. The exception forces the processor into ARM state so no
veneer is needed.
Exception handling code that may handle exceptions from Thumb code. No veneer is needed for the return.
Thumb code that calls ARM subroutines in other files (the interworking return sequences belong to the callee,
not the caller).
ARM code that calls Thumb subroutines in other files (the interworking return sequences belong to the callee,
not the caller).
3.1.3 Detecting interworking calls
The linker generates an error if it detects a direct ARM/Thumb interworking call where the called routine is not built
for interworking. You must rebuild the called routine for interworking.
For example, Example 3-1 shows the error that is produced if the ARM routine in Example 3-3 is compiled and linked
without the -apcs /interwork option.
Example 3-1
Error: L6239E: Cannot call ARM symbol 'arm_function' in non-interworking object
armsub.o from THUMB code in thumbmain.o(.text)
These types of error indicate that an ARM-to-Thumb or Thumb-to-ARM interworking call has been detected from the
object module object to the routine symbol, but the called routine has not been compiled for interworking. You must
recompile the module that contains the symbol and specify -apcs /interwork.
Interworking ARM and Thumb
Copyright ?1999 2001 ARM Limited 3-2