How the linker performs library searching, selection, and scanning
The linker always searches user libraries before the ARM libraries.
If you specify the
--no_scanlib command-line option, the linker does not
search for the default ARM libraries and uses only those libraries
that are specified in the input file list to resolve references.
The linker creates an internal list of libraries as follows:
Any libraries explicitly specified in the input file list are added to the list.
The user-specified search path is examined to identify ARM standard libraries to satisfy requests embedded in the input objects.
The best-suited library variants are chosen from the searched directories and their subdirectories. Libraries supplied by ARM have multiple variants that are named according to the attributes of their members.
Be aware of the following differences between the way the linker adds object files to the image and the way it adds libraries to the image:
Each object file in the input list is added to the output image unconditionally, whether or not anything refers to it. At least one object must be specified.
A member from a library is included in the output only if:
An object file or an already-included library member makes a non-weak reference to it.
The linker is explicitly instructed to add it.
If a library member is explicitly requested in the input file list, the member is loaded even if it does not resolve any current references. In this case, an explicitly requested member is treated as if it is an ordinary object.
Unresolved references to weak symbols do not cause library members to be loaded.