2.3 Relocatable Code

The MPLAB XC8 PIC Assembler package includes a linker, hlink, and always builds code in a manner that is referred to by MPASM documentation as relocatable code. That is to say that the PIC Assembler produces relocatable object modules that can be linked with other modules or archive libraries to form the final program image.

Typically, you always run the PIC Assembler through the entire build sequence, so that a final image of your project is produced, but you can, if required, stop the build process before the link step by using the -c option. This results in an object file output, which must later be linked (together with other object modules or library archives, if required) to form the final program image.