You copied the Doc URL to your clipboard.

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

A32 or T32 (AArch32 state instruction sets).

Note

Microlib is not supported for AArch64 state.
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.

Note

In Armv8, VFP hardware is integral to the architecture. Software floating-point is supported for AArch32 state, but is not supported for AArch64 state.
Position independence

Position independent code uses PC-relative addressing modes where possible and otherwise accesses global data through the Global Offset Table (GOT).

Different ways to access your data are as follows:

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

Different ways to access your code are as follows:

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

A bare-metal Position Independent Executable (PIE) is an executable that does not need to be executed at a specific address but can be executed at any suitably aligned address.

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

You can only achieve position-independent C++ code with -fbare-metal-pie.

Note

  • Position independence is supported only in AArch32 state, and is not supported in microlib.
  • Bare-metal PIE support is deprecated in this release.

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.

Was this page helpful? Yes No