22 Linking Programs

The compiler will automatically invoke the linker unless the compiler has been requested to stop after producing an intermediate file.

The linker will run with options that are obtained from the command-line driver. These options specify the memory of the device and how objects should be placed in the memory. Device-specific linker scripts are used.

The linker operation can be controlled using the driver, see Options for Linking for more information.

The linker creates a map file which details the memory assigned and some objects within the code. The map file is the best place to look for memory information. See MPLAB® XC16 Assembler, Linker and Utilities User’s Guide (DS50002106) for an explanation of the detailed information in this file.