8.2 Linker Usage

The MPLAB XC32 Object Linker translates object files from the MPLAB XC32 assembler, and archive/library files from the MPLAB XC32 archiver/librarian, into an executable file. See the MPLAB® XC32 C Compiler User’s Guide for PIC32A MCU (DS-50003831) for an overview of the tools process flow.

In most instances it will not be necessary to invoke the linker directly, as the compiler driver, xc32-gcc, will automatically execute the linker with all necessary arguments. Using the linker directly is not simple, and should be attempted only by those with a sound knowledge of the compiler and linking in general. The compiler often makes assumptions about the way in which the program will be linked. If the linker sections are not linked correctly, code failure may result.