| |||
| Home > Introduction > About the runtime libraries > Thumb C libraries | |||
The linker automatically links in the Thumb C library if it detects that one or more of the objects to be linked have been built for:
Thumb or Thumb-2, either
using the --thumb option or #pragma thumb
interworking, using the --apcs /interwork option
on architecture ARMv4T
an ARM v6-M architecture target or processor, for example, Cortex-M1
an ARMv7-M architecture target or processor, for example, Cortex-M3.
Despite its name, the Thumb C library might not contain exclusively
Thumb code, but might use ARM instructions if they are available
for critical functions, such as memcpy, memset,
and memclr, for good performance. The bulk
of the Thumb C library, however, is coded in Thumb for the best
code density.
The Thumb C library used for ARMv6-M targets contains only Thumb-1 code.
The Thumb C library used for ARMv7-M targets contains only Thumb-2 code.
See Chapter 2 The C and C++ Libraries for more information.