LINK2 for modules compiled by version 2 compilers,
LINK3 for modules compiled by version 3 compilers.
At present (September 1986), LINK is equivalent to LINK2.
The parameters to the commands consist of a list of input module names and a single name to be given to the output module. The file-name extension .MOB is assumed for all of the names.
One of the reasons for carrying out this operation is to reduce the time overhead in loading a program made up of a large number of fixed modules. Another is to make a program more self-contained and less dependent on the module environment in which it is run. Use of it involves sacrificing the flexibility of load-time linking and convenience of individual module development, so that it is appropriate mainly for stable program suites. Note also that, in the case of modules compiled with the V3 diagnostic compilers, that DIAGNOSTIC INFORMATION IS LOST in the linking process.
If the first input module is a main program, the resultant module will also be a main program; otherwise the resultant module will simply be a library of external procedures.
The import list of the output module will consist of all those imports appearing in the import lists of the input modules which are NOT satisfied by internal cross-reference.
By default, the export list of the output module will consist of all those exports which are NOT used to satisfy internal cross-references.
The user may modify this behaviour by requesting that an export should either be included irrespective (even if used internally) or excluded irrespective (even if not used internally).
} LINK2 Mainfile,Auxfile1,.../Outfile-Options
Up to 19 auxiliary files may be specified.
Mainfile
The object file containing the main module.
Auxfile1..19
Object files containing further modules.
Outfile
The file to receive the output object module. If omitted, the
output file will have the same name as (i.e. will replace)
the main input file.
If one is specified as "*", it will be processed before the other, so that the other is always a list of exceptions to the first. Specifying "*" for both is daft.
More precisely, you are likely to get into trouble if any included exports are not from the first module of the parameter list (Mainfile).
In other words, it should be OK to part-link A with B and C, provided that, at run-time, the exports made by B and C are only used by A, B, or C, not by the main program or other modules loaded with it.
The output file name is mandatory. The command line is NOT processed by PAM.
For example
} LINK3 MAIN,SUB1,SUB2/NEWMAIN
or
} LINK3
1st file: MAIN
2nd file: SUB1
3rd file (or *): SUB2
4th file (or *): *
New file: NEWMAIN
A linked module is itself acceptable as input to the LINK program.
If an import name could be satisfied by more than one export name (by virtue of the presence of multiple exports with the same name) the one that is used to satisfy the reference is not guaranteed to match that which would be selected by load-time linking. In general, this means that such duplication should be avoided.
Multiple occurrences of the same (unsatisfied) import name will appear multiply in the linked file.
Diagnostic tables do not survive linking.
Automatic linking (as with LINK2) is not available.
view:link printed on 15/02/89 at 21.49