Go to the first, previous, next, last section, table of contents.


How linker emulations are generated

The linker is controlled by linker scripts written in a linker control language. A linker emulation gives the personality of the linker, and is mainly defined by certain linker scripts. If you want to understand how these scripts are generated, the main file to look at is the `genscripts.sh' shell script, which is invoked by the `Makefile' for each "emulation" to generate a set of 5 linker scripts.

For example, for the sun3 emulation used by ld68k, `genscripts.sh' sources the file `emulparams/sun3.sh', which sets the emulation parameters, and specifies that the format is a.out, and to use `scripttempl/aout.sc' to generate the linker scripts.

genscripts.sh generates 5 different linker scripts, one for each of the ld options `-z' (default), `-n', `-N', `-r' and `-Ur', where each script is slightly different and is generated using the template in `scripttempl/aout.sc' (for the sun3).


Go to the first, previous, next, last section, table of contents.