3.7.1.3 XC8 Linker Category

The following describe the options available in the MPLAB X IDE XC8 Linker categories as well as the VS Code Toolchain > Linker category.

Runtime

Libraries
This field allows you to specify the names of additional libraries to link.
Library search path
This field lets you specify the search paths used by the compiler to find library files. See L: Specify Library Search Path Option.
Link in C library
This selector specifies whether the standard libraries will be linked. See Nodefaultlibs Option.

Memory Model

Garbage collect unused sections
This selector specifies if the linker should remove sections that it considers are not used.

Additional Options

Extra linker options
This field allows you to specify additional linker-related options that cannot be otherwise controlled from the IDE. See Wl: Pass Option To The Linker, Option.
Checksum
If required, enter an argument in this field to generate a hash value over data in the HEX file. The argument mimics that used by the -mchecksum option used by MPLAB XC8 for PIC devices, specifically:
start-end@destination[,specifications]
which calculates a hash from start to end addresses, placing the result at destination, and the specifications are as follows:
  • width=n selects the width of the hash result in bytes. A negative width will store the result in little-endian byte order.
  • offset=nnnn specifies an initial value or offset to be added to the hash.
  • algorithm=n selects the hash algorithm to use.
  • code=nn.Base is a hexadecimal code that will trail each byte in the hash result. This can allow each byte of the hash result to be embedded within an instruction.
  • polynomial=nn hexadecimal value which is the polynomial to be used for CRC hashes.
  • revword=n reads the data in reserve order with the word width specified.
  • skip=n.Bytes skips the MSB in the word width specified.
  • xor=n is a hexadecimal value that will be XORed with the hash result before it stored.
Check the MPLAB® XC8 C Compiler User’s Guide for PIC® MCU for full information regarding this option. Note that this field does not map to any compiler option, but will instead trigger a post-build execution of the Hexmate utility.
Trace type
This selector is not yet implemented.
Use response file to link
This field allows a command-line options file to be used by the compiler during the link step, in preference to the other link-step settings in the project properties. See Long Command Lines. This option is only relevant when running MPLAB X IDE under Windows.