This manual describes the VMS Patch Utility (PATCH), a tool for experienced system programmers to make permanent changes to executable and shareable image files, or even non-image files, without requiring recompilation, reassembly, or relinking of the original source code.
Key functionalities include:
- Modifying Image Files: Allows direct examination and modification of code and data within image files.
- Symbolic Referencing: Facilitates locating specific addresses using global, local, universal, module, program section, routine names, symbolic instruction labels, and user-defined symbols.
- Patch Area: Provides a dedicated storage space for adding new instructions and data. PATCH can automatically manage branch instructions to reroute program flow to and from this area if new code exceeds available space.
- Command Procedures: Supports creating and executing command procedures for interactive or batch application of patches, useful for applying changes to multiple copies of an image file.
- Output Generation: Produces an updated output image file, a journal file recording all session commands, and command procedure files (if created).
- Modes of Operation: Offers various entry and display modes (context, length, radix, symbol search) to control how commands are interpreted and results are presented.
The patching process typically involves invoking PATCH, setting an Engineering Change Order (ECO) level, entering modification commands (EXAMINE, REPLACE, INSERT, DEPOSIT), applying the patch with UPDATE, and then EXITing the utility. Users can control whether a new version of the patched file is created or the existing one is overwritten, with a caution for permanent overwrites. Specific rules apply when patching shareable or device driver images, often necessitating user-defined patch areas.