Generates a Position Independent eXecute Only (PIXO) library.
--pixolib is disabled by default.
--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
armlink. If you invoke the linker separately, then you must use the
--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
- C library.
- Math library for targets with hardware double precision floating-point support that is compatible with
- Math library for targets with hardware single precision floating-point support that is compatible with
- Math library for targets without hardware support for floating-point.
- Software floating-point library. This library is required when:
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.
- Little endian
- Big endian
NoteGeneration 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
SHT_PROGBITSmust 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.
This example shows the command-line invocations for compiling and linking in separate steps, to create a PIXO library from the source file
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
armclang --target=arm-arm-none-eabi -march=armv7-m -mpixolib -Wl,--scatter=pixo.scf -o foo-pixo-library.o foo.c mc_wg.l