You copied the Doc URL to your clipboard.

Arm Compiler armlink User Guide : --pixolib

--pixolib

Generates a Position Independent eXecute Only (PIXO) library.

Default

--pixolib is disabled by default.

Syntax

--pixolib

Parameters

None.

Usage

Use --pixolib to create a PIXO library, which is a relocatable library containing eXecutable Only code.

When creating the PIXO library, if you use armclang to invoke the linker, then armclang automatically passes the linker option --pixolib to armlink. If you invoke the linker separately, then you must use the armlink --pixolib command-line option. When creating a PIXO library, you must also provide a scatter file to the linker.

Each PIXO library must contain all the required standard library functions. Arm® Compiler 6 provides PIXO variants of the standard libraries based on Microlib. You must specify the required libraries on the command-line when creating your PIXO library. These libraries are location in the compiler installation directory under /lib/pixolib/.

The PIXO variants of the standard libraries have the naming format <base>.<endian>:

  • <base>
    mc_wg
    C library.
    m_wgv
    Math library for targets with hardware double precision floating-point support that is compatible with vfpv5-d16.
    m_wgm
    Math library for targets with hardware single precision floating-point support that is compatible with fpv4-sp-d16.
    m_wgs
    Math library for targets without hardware support for floating-point.
    mf_wg
    Software floating-point library. This library is required when:
    • Using printf() to print floating-point values.
    • Using a math library that does not have all the required floating-point support in hardware. For example if your code has double precision floating-point operations but your target has fpv4-sp-d16, then the software floating-point library is used for the double-precision operations.
  • <endian>
    l
    Little endian
    b
    Big endian

Restrictions

Note

Generation of PIXO libraries is only supported for Armv7‑M targets.

When linking your application code with your PIXO library:

  • The linker must not remove any unused sections from the PIXO library. You can ensure this with the armlink --keep command-line option.
  • The RW sections with SHT_NOBITS and SHT_PROGBITS must be kept in the same order and relative offset for each PIXO library in the final image, as they were in the original PIXO libraries before linking the final image.

Examples

This example shows the command-line invocations for compiling and linking in separate steps, to create a PIXO library from the source file foo.c.

armclang --target=arm-arm-none-eabi -march=armv7-m -mpixolib -c -o foo.o foo.c 
armlink --pixolib --scatter=pixo.scf -o foo-pixo-library.o foo.o mc_wg.l

This example shows the command-line invocations for compiling and linking in a single step, to create a PIXO library from the source file foo.c.

armclang --target=arm-arm-none-eabi -march=armv7-m -mpixolib -Wl,--scatter=pixo.scf -o foo-pixo-library.o foo.c mc_wg.l 
Was this page helpful? Yes No