Assembler Link Files

Describes the format and usage of .lin files containing linker commands.

The Assembler linker takes commands from both the linker command line and also an optional linker input file with the extension .lin. The commands contained in the .lin file tell the linker what to include in the executable file, and the filename and other properties of the executable output file. By default, the assembler linker input file exists in the same directory as the Assembler .obj files. The linker looks first for a .lin, and if found, processes it before any found .obj files.

For example, if the Assembler object filename is test.obj, you can write a linker input file called test.lin and specify the following include commands:
// INCLUDE TEST2.OBJ
// INCLUDE TEST3.OBJ
// INCLUDE TEST4.OBJ

The resulting .390 executable module has four assembler modules linked into it.

A common usage of the linker command is to specify which entry points are actually in COBOL modules. Take the following example:
// INCLUDE TEST2.OBJ
// INCLUDE TEST3.OBJ,TYPE=CBL

In this example, TEST3 is an external symbol in a COBOL module. The linker does not look for test.obj. Instead the linker generates a small stub Assembler module so that if the TEST3 entry point is ever branched to by an Assembler module, a transfer of control is be done to give the COBOL TEST3 module control.