You copied the Doc URL to your clipboard.

Minimizing code size by reducing compilation required for interworking

The linker detects when an ARM function is being called from a Thumb state, and when a Thumb function is being called from an ARM state. You can use feedback from the linker to avoid compiling functions for interworking that are never used in an interworking context.

Note

Reduction of compilation required for interworking is only applicable to ARMv4T architectures. ARMv5T and later processors can interwork without penalty.

To reduce compilation required for interworking:

  1. Compile your source code.

  2. Use the linker options --feedback=filename and --feedback_type=iw to create a feedback file that reports functions requiring interworking support.

  3. Re-compile using the compiler option --feedback=filename to feed the feedback file to the compiler.

The compiler uses the feedback file generated by the linker to compile the source code in a way that enables the compiler to subsequently avoid compiling functions for interworking if those functions are not used in an interworking context.

Note

Always ensure that you perform a full clean build immediately prior to using the linker feedback file. This minimizes the risk of the feedback file becoming out of date with the source code it was generated from.

See also

Concepts

Developing Software for ARM Processors:

Reference

Compiler Reference:

Linker Reference:

Tasks

Using the Linker: