Specifications
Linker and Librarian
8.3 Using the LIBRARIAN with the Linker
8.3 Using the LIBRARIAN with the Linker
You can use the Librarian utility (LIBRARIAN) to collect input—object modules
and shareable images—for the linker. You can assign system-defined logical
names to the libraries. Then, the linker automatically searches these libraries
to resolve references. The library logical names are LNK$LIBRARY and
LNK$LIBRARY_1 through LNK$LIBRARY_999. When you associate libraries
with these logical names, do not skip any logical names in the sequence.
If you choose a name for your library other than the system-defined logical library
names, you can link it to your program by specifying the qualifier LIBRARY in
the LINK command. For example, you could store object modules in the library
INCOME.OLB. To link it with the program INCOME.OBJ, enter the following
command:
$ LINK INCOME,INCOME.OLB/LIBRARY
8.4 Additional Linker Features
The linker also incorporates the following features:
• Options file
• Image map
• Object language
Use an options file to specify linker options and input file specifications. Linker
options allow you to control aspects of a link operation, such as the starting
virtual address of an image. Shareable images used as input files must be
specified in an options file. In addition, options files can be useful to specify a set
of frequently used input files or to specify input files in a LINK command that
exceeds the maximum size of a DCL command.
The image map contains information on the contents of the image and on the link
process. You can use the map to locate link-time errors, view the image layout in
virtual memory, keep track of global symbols, and so forth.
8.5 Librarian Utility
Libraries are files you create to store frequently used modules of code or text.
With the LIBRARIAN, you can create a library, maintain the modules in a library,
or display information about a library and its modules. You use LIBRARIAN
commands to manage modules within a library. You can use DCL commands to
manage the entire library as one unit. For example, if you want to rename the
library, use the DCL command RENAME.
8–3










