This document, the VAX-11 Linker Reference Manual (Order No. AA-D019B-TE, March 1980), serves as a comprehensive guide to the VAX-11 Linker, a programming development tool for the VAX/VMS V02 operating system. It describes the linker's functionality, its operation, and how users can employ it to create executable programs.
Core Purpose and Operation:
The VAX-11 Linker takes output from language translators (like assemblers or compilers), primarily "object modules," and binds them into an "image" that can be executed on VAX-11 hardware. Its main functions include:
- Virtual Memory Allocation: Assigning addresses for the program sections within the final image.
- Symbolic Reference Resolution: Resolving calls and references between different modules by looking up "global symbols" (accessible across modules) and "universal symbols" (special global symbols for shareable images) within provided input files and libraries.
- Image Initialization: Filling the image with binary data and code.
- Generating Output Files: Optionally producing an "image map" (a printable summary of the image's contents and the linking process) and a "symbol table file" (recording symbol values).
Types of Images:
The linker can create three types of images:
- Executable Images: The most common type, activated by a user command (e.g., RUN).
- Shareable Images: Designed for sharing procedures and data among multiple processes, conserving memory and disk space, and facilitating large application development. They are not directly executable but are linked with executable images. They support "transfer vectors" for compatibility during software updates.
- System Images: Intended for stand-alone operation outside the VAX/VMS operating system control.
Key Concepts and Features:
- Modular Programming: The linker facilitates modular programming by combining separately compiled/assembled modules, simplifying development, and enhancing debug capabilities.
- Libraries: The linker uses libraries (collections of object modules and their symbol tables) to resolve undefined symbolic references. This includes user-defined default libraries and the system default library (composed of
VMSRTL.EXE for run-time procedures and STARLET.OLB for object modules).
- Symbols: Defines and distinguishes between local, global (strong and weak definitions), and universal symbols, and how they are resolved.
- Program Sections (PSECTs) and Image Sections (ISECTs): Object modules define PSECTs with various attributes (e.g., relocatability, executability, writability, shareability). The linker groups these into ISECTs based on their attributes and then into "clusters" for memory management and performance optimization.
- Options Files: Allows users to specify complex or frequently used input file specifications and special linker instructions (e.g., defining base addresses, managing clusters, setting shareable image matching parameters, or explicitly defining symbols).
Usage:
The linker is invoked using the LINK command, which supports numerous command and file qualifiers to control its behavior (e.g., /MAP for image maps, /DEBUG for debugging information, /SHAREABLE to create a shareable image).
Appendices:
The document includes appendices detailing:
- Linker Messages: A list of error and warning messages.
- Image Map Illustrations: Examples of the various map formats (brief, default, full, cross-reference).
- VAX-11 Object Language Specification: A technical description of the object module format accepted by the linker, useful for compiler/assembler developers.
- ANALYZE Program: A utility that checks object modules for adherence to the VAX-11 object language specifications.
In essence, the manual provides both foundational knowledge for new users and in-depth technical details for experienced programmers and system designers working with the VAX-11 Linker.