HP 3000 Manuals

Using a Relocatable Library [ Getting Started as an MPE/iX Programmer Programmer's Guide ] MPE/iX 5.0 Documentation


Getting Started as an MPE/iX Programmer Programmer's Guide

Using a Relocatable Library 

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

HP Link Editor/XL can build RLs from independent relocatable object
modules and by 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 file.

On 900 Series HP 3000 systems, an RL automatically expands until it
reaches the maximum number of relocatable object modules it can contain.
You can improve its structure and increase the size of its internal
tables to allow for an additional 25 percent expansion of the library
symbol table.  If an RL reaches its relocatable object module limit, you
can create a new library with a larger limit and copy the contents of the
old library to the new one.

When HP Link Editor/XL resolves an external reference, it merges the
entire relocatable object module containing that routine into the
executable program file, even if only one procedure in that module is
required.  If the called procedure is one of several procedures in the
relocatable object module, the entire module is added to the program
file.  To avoid adding unnecessary code due to including unreferenced
procedures in an executable program file, keep the library routines in
separate source files.

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 file.

   *   Purge selected relocatable object modules from an RL.

   *   List RL contents.

You can copy a relocatable object module from a relocatable object file
into a relocatable library (RL). Creating a searchable RL requires using
HP Link Editor/XL to create the RL and placing relocatable object files
in it.  For 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 file named LIB1EX1 to it, and exit HP Link Editor/XL.
For detailed information on manipulating an RL, refer to Link Editor/XL 
Reference Manual (32650-90030).



MPE/iX 5.0 Documentation