1.2.5 Selection of ARM® C and C++ library variants based on build options

When you build your application, you must make certain choices such as the target architecture, instruction set, and byte order. You communicate these choices to the compiler using build options. The linker then selects appropriate C and C++ library variants compatible with these build options.

Choices that influence the ARM® C and C++ library variant include the following:

Target Architecture and instruction set

ARM or Thumb instruction sets.

Byte order

Big-endian or little-endian.

Floating-point support
  • Software (SoftVFP).
  • Hardware (VFP).
  • Software or hardware with half-precision or double-precision extensions.
  • No floating-point support.
Position independence

Different ways to access your data are as follows:

  • By absolute address.
  • Relative to sb (read/write position-independent).
  • Relative to pc (fpic).

Different ways to access your code are as follows:

  • By absolute address when appropriate.
  • Relative to pc (read-only position independent).

The standard C libraries provide variants to support all of these options.

You can only achieve position-independent C++ code with --apcs=/fpic.

Note:

Position independence is not supported in microlib.

When you link your assembler code, C or C++ code, the linker selects appropriate C and C++ library variants compatible with the build options you specified. There is a variant of the ISO C library for each combination of major build options.

Non-ConfidentialPDF file icon PDF versionARM DUI0475M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.