MPLINK linker performs many functions:
Locates Code and Data. The linker takes as input relocatable object files. Using the linker script, it decides where the code will be placed in program memory and where variables will be placed in RAM.
Resolves Addresses. External references in a source file generate relocation entries in the object file. After the linker locates code and data, it uses this relocation information to update all external references with the actual addresses.
Generates an Executable. Produces a .hex file that can be programmed into a PICmicro MCU or loaded into an emulator or simulator to be executed.
Configures Stack Size and Location. Allows MPLAB C18 to set aside RAM space for dynamic stack usage.
Identifies Address Conflicts. Checks to ensure that program/data do not get assigned to space that has already been assigned or reserved.
Provides Symbolic Debug Information. Outputs a file that MPLAB IDE uses to track address labels, variable locations, and line/file information for source level debugging