Using a Relocatable Library

MPE/iX relocatable libraries (RLs) giv e you the ability to use one or more libraries to resolv e references at link time.

HP Link Editor/XL can build RLs from independen t relocatable object modules and b y copying relocatable object modules from one RL to another. It can also extract a copies of relocatable object modules from an RL and place them in a relocatable object ￿le.

On 900 Series HP 3000 systems, an RL automatically expands un til it reaches the maximum number of relocatable object modules it can con tain. You can impro ve its structure and increase the size of its in ternal tables to allo w for an additional 25 percen t expansion of the library sym bol table. If an RL reac hes its relocatable object module limit, y ou can create a new library with a larger limit and cop y the contents of the old library to the new one.

When HP Link Editor/XL resolv es an external reference, it merges the en tire relocatable object module containing that routine in to the executable program ￿le, ev en if only one procedure in that module is required. If the called procedure is one of sev eral procedures in the relocatable object module, the en tire module is added to the program ￿le. T o avoid adding unnecessary code due to including unreferenced procedures in an executable program ￿le, keep the library routines in separate source ￿les.

You can perform the following operations on RLs: Build new RLs.

Add relocatable object modules to an existing RL.

Copy selected relocatable object modules from one RL to another or to a relocatable object ￿le.

Purge selected relocatable object modules from an RL.

List RL contents.

You can copy a relocatable object module from a relocatable object ￿le in to a relocatable library (RL). Creating a searc hable RL requires using HP Link Editor/XL to create the RL and placing relocatable object ￿les in it. F or example, the commands

LINKEDIT

LinkEd> BUILDRL NEWRL

LinkEd> ADDRL FROM=LIB1EX1

LinkEd> EXIT

enter HP Link Editor/XL, build a new RL named NEWRL, the contents of a relocatable object ￿le named LIB1EX1 to it, and exit HP Link Editor/XL. F or detailed information on manipulating an RL, refer to Link Editor/XL Reference Manual (32650-90030).

4-12 HP Link Editor/XL