HP 3000 Manuals

New Commands for Maintaining Executable Libraries [ Technical Addendum for HP Link Editor/iX ] MPE/iX 5.5 Documentation


Technical Addendum for HP Link Editor/iX

New Commands for Maintaining Executable Libraries 

ALTXL Command 

This ALTXL command changes the dependent library string for an executable
library (XL). It accepts two options, both are required:  the target XL
name and the dependent library string.  Dependent libraries can be
specified in an indirect file or directly in the argument to the LIB=
parameter.

When the Link Editor builds an XL, it inserts an MPE Program Auxiliary
Header after the LST header.  Any dependent library string for the XL is
inserted in this header.

The dependent library string algorithm for ALTXL is similar to the
ALTPROG string algorithm.  If a new dependent library string is the same
size or smaller than the current dependent library string in the XL, the
Link Editor overwrites the old string.  If the new string is larger than
the old string, the Link Editor attempts to write the new string at the
end of the LST string table.  If there is not enough room in the string
table, an error message is displayed.  If this happens, you can only add
or change dependent library strings in the XL by rebuilding the XL.

Syntax:.   

ALTXL XL=xl_name; LIB=dependent_library 

Parameters.   

xl_name             Names the executable library whose dependent library
                    list is to be altered.

dependent_library   Names a list of dependent libraries that must be
                    loaded when this XL is loaded.  Each dependent
                    library must have a filecode of NMXL.

                    When you want to include several libraries, you can
                    name each library directly, or you can name a single
                    file that contains a list of the libraries you want
                    to include.  If you use this last, indirect method,
                    you must precede the indirect file name with a caret
                    symbol (^).

                    ____________________________________________________ 

                    NOTE  You must supply at least one dependent library
                          since the LIB= parameter is required.

                    ____________________________________________________ 

Examples.   

     :PRINT MYINDF1
            NEWLIB.LIB.MYACCT
            LIB2.LIB.SYS

     :LINKEDIT
     LinkEd> ALTXL MYLIB1; LIB=^MYINDF1
     LinkEd> ALTXL NEWLIB.LIB.MYACCT; LIB=NEW2.TMP.SYS
     LinkEd> EXIT

     :RUN MYOUT;XL="MYLIB1"

The loader loads the program file, MYOUT, then the executable library,
MYLIB1.  Since MYLIB1 has dependent libraries, NEWLIB.LIB.MYACCT and
LIB2.LIB.SYS, the loader loads them.  NEWLIB.LIB.MYACCT has a dependent
library NEW2.TMP.SYS so it is loaded after NEWLIB.LIB.MYACCT and before
LIB2.LIB.SYS. The load graph is as follows:

     MYOUT->MYLIB1->NEWLIB.LIB.MYACCT->NEW2.TMP.SYS->LIB2.LIB.SYS

     :LINKEDIT
     LinkEd> ALTXL MYLIB2;LIB=MYXL.PUB.LINKER, MYXL2.TMP.SYS
     LinkEd> EXIT

     :RUN MYOUT;XL="MYLIB2"

When MYLIB2 is loaded, the loader loads MYXL and MYXL2.  If either of
these libraries has its own dependent libraries, each new dependent
library is loaded, in order, after the library that contains the
dependency.

BUILDXL Command 

This command now accepts a third parameter, LIB=, used to specify
dependent libraries.  This parameter accepts an indirect file or a list
of fully qualified library names.  The Link Editor concatenates the
dependent library names into a string and inserts the string into the LST
Program Auxiliary header for the loader to search at run time.

Syntax.   

BUILDXL XL=xl_file [;LIMIT=max_modules] [;LIB=dependent_library]

Where: 

dependent_library   Names a dependent library or a list of dependent
                    libraries that must be loaded when this XL is loaded.
                    Each dependent library must have a filecode of NMXL.

                    When you want to include several libraries, you can
                    name each library directly, or you can name a single
                    file name that contains a list of the libraries you
                    want to include.  If you use this last, indirect
                    method, you must precede the indirect file name with
                    a caret symbol (^).

If the LIB= option is not specified, the XL will be built without any
dependent libraries.

Example:.   

     BUILDXL MYXL2;LIB=^MYINDF

This command creates an executable library named MYXL2, that will have
dependent libraries as specified in MYINDF. When MYXL2 is loaded, its
dependent libraries are also loaded.



MPE/iX 5.5 Documentation