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):

xc-dsc-ld -o output.elf output.o --script
  ../support/dsPIC33E/gld/p33EP32MC504.gld

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

xc-dsc-gcc -o output.elf output.s -Wl,--script,
  ../support/dsPIC33E/gld/p33EP32MC504.gld

If no linker script is specified, the linker will use an internal version known as the default linker script. The default linker script has memory range information and SFR definitions that are appropriate for the command line simulator (mdb). The default linker script can be examined by invoking the linker with the --verbose option:

xc-dsc-ld --verbose 

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