Getting Started with M1750 Ada: Ada 95 Compilation System for Spacecraft Microprocessors | ||
---|---|---|
Prev | Chapter 2. Advanced Techniques | Next |
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:
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.