23.3.3.2 Optional Inclusion of Processor-Specific Peripheral Libraries
This section of the processor definitions linker script ensures that the processor-specific peripheral libraries get included, but only if the files exist.
/*********************************************************************
* Processor-specific peripheral libraries are
optional
*********************************************************************/
OPTIONAL("libmchp_peripheral.a")
OPTIONAL("libmchp_peripheral_32MX795F512L.a")
The OPTIONAL lines specify that libmchp_peripheral.a
and
libmchp_peripheral_32MX795F512L.a
should be included in the link as
if the files were named on the command line. The linker attempts to find these files in
the current directory. If they are not found in the current directory, the linker
searches through the library search paths. If they are not found in the library search
paths, the link process continues without error. The linker will error only when a
symbol from the -peripheral library is required but not found elsewhere.