MPE/iX System Utilities Reference Manual (32650-90882)
189
22 SOMPATCH
Use the SOMPATCH utility for binary modification of a native mode spectrum object module
(SOM) program or library file. Binary modification is referred to informally as
patching
.
WARNING
Do not use this utility without service center support. Unauthorized
use will void your warranty and may cause data loss.
This utility is capable of tracking all of the modifications that it makes to a SOM file. This
history is kept in the SOM file in an unloadable buffer space, which affects neither
performance nor memory usage of the program. This buffer space is provided by linking in
a ypatch file when the executable SOM file is created.
The ypatch file to be linked into SOM 0 of NL.PUB.SYS creates loadable code because the
storage area needs to be in the boot images, and the SAINT utility does not store
unloadable spaces in the boot images. This special ypatch file is ypatsom0 and would
normally be used only in the NL.
The SOMPATCH utility will accept as input a file not linked with a ypatch file. However, you
should use it to build files
with
the ypatch file, so that at any time you can view and query
the file and patch history. If the ypatch file is not linked in, no logging is available. All
native-mode system products are required to link with the ypatch file if the product is to be
supported in the field to any extent with binary patching.
MPE/iX contains a symbolic debugger that can be used for memory patching or to generate
patches that you will permanently apply with the SOMPATCH utility.
To patch compatibility mode files, use the slpatch and patch files.
Input Files
The SOMPATCH utility has one required file and that is the input file to be queried or
patched. This file can be a relocatable or executable library SOM or a program SOM. The
SOMPATCH utility treats this file as a read-only file. No backup copy is made; however, a
QUIT command can be used at any time, with this file remaining unchanged.
The user can also optionally specify a second input file, a script file of modification
instructions and logging information, referred to hereafter as a
patch file
. A patch file is
an ASCII file, created by an editor or other text utility, that specifies one or more
commands to the SOMPATCH utility. The patch file is given on the command line, or by the
USE command, to apply one or more patches. Patches can also be applied interactively.
Refer to the paragraph "Interactive Patching" under "Operation."
Error Handling
The input file is maintained in its original state until the user types EXIT or SAVE. If there
is a system malfunction between the EXIT command and the colon prompt, purge the