How the linker searches for the ARM standard libraries
The linker searches for the ARM® standard libraries using information specified on the command-line, or by examining environment variables.
By default, the linker searches for the ARM standard libraries
../lib, relative to the location of the armlink executable. Use the
--libpath command-line option to specify a
The --libpath command-line option
--libpath command-line option with a comma-separated list of
parent directories. This list must end with the parent directory of the ARM library directories
The sequential nature of the search ensures that armlink chooses the library that appears earlier in the list if two or more libraries define the same symbol.
Library search order
The linker searches for libraries in the following order:
Relative to the current path.
At the location specified with the command-line option
At the location specified in
How the linker selects ARM library variants
The ARM Compiler toolchain includes a number of variants of each of the libraries, that are built using different build options. For example, architecture versions, endianness, and instruction set. The variant of the ARM library is coded into the library name. The linker must select the best-suited variant from each of the directories identified during the library search.
The linker accumulates the attributes of each input object and then selects the library variant best suited to those attributes. If more than one of the selected libraries are equally suited, the linker retains the first library selected and rejects all others.
--no_scanlib option prevents the linker from searching the directories for the ARM