10.2 Command Line Information

Linker scripts are specified on the command line using either the -T option or the --script option (see Options that Control Output File Creation):

xc32-ld -o output.elf output.o --script
  ../support/PIC32A/gld/p32AK1216GC41064.gld

If the linker is invoked through xc32-gcc, add the -Wl, prefix to allow the option to be passed to the linker:

xc32-gcc -o output.elf output.s -Wl,--script,
  ../support/PIC32A/gld/p32AK1216GC41064.gld

Linker scripts are located by using the library search path which, by default, includes the standard directories provided with the install.