2.2. Using a Custom Linker Script File

The linker script file describes the layout of memory on the target computer and includes instructions on how the linker is to place object code modules in that memory. The default linker script file is /opt/m1750-ada-1.7/m1750-coff/lib/ldscripts/coff_m1750.x. You should copy this file to your local directory, and edit as necessary. See the linker chapter in the XGC User Manual for a description of the format of the file.

Example 2-2. Making a Custom Linker Script File

$ cp /opt/m1750-ada-1.7/m1750-coff/lib/ldscripts/coff_m1750.x .
$ mv coff_m1750.x myboard.ld
$ vi myboard.ld
... make any changes ...

You can then build a program using your custom linker script rather than the default as follows:

Example 2-3. Using the Custom Linker Script File

$ m1750-coff-gnatmake -f hello -largs -T myboard.ld

You can add the line "STARTUP(myart0.o)" to your custom linker script file. This will pick up your custom start file object code without having to mention its name of the make command line.