By default, the linker searches for the ARM standard libraries
../lib, relative to the location of the armlink executable.
You can also control how the linker searches for the ARM standard libraries
--libpath command-line option.
Some libraries are stored in subdirectories. A library might
be added in assembly code or by a linker script from a particular
subdirectory. For such a library , the names of subdirectories are placed
in each object by using a symbol of the form
You must specify the linker command-line option
inform the compiler to look in all subdirectories for system libraries.
--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 linker searches subdirectories given by the symbol
if you include the path separator character on the end of the library
/on Red Hat Linux.
For example, for
Lib$$Request$$armlib the linker searches the
The sequential nature of the search ensures that the linker chooses the library that appears earlier in the list if two or more libraries define the same symbol.
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
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 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.