HP 3000 Manuals

ADDRL [ HP Link Editor/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Link Editor/XL Reference Manual

ADDRL 

This command takes relocatable object modules, which are compiled from
one or more source files, and puts them into a relocatable library.  To
add a relocatable object module from another relocatable library, use the
COPYRL command.

Syntax 

        ADDRL FROM= source_file [, source_file]...
              [;TO= dest_file]
              [;MERGE [;RL= rl_file [, rl_file]...]]
              [;SHOW]
              [;REPLACE]

Parameters 

source_file         Names the relocatable object file containing the
                    module(s) to add to the relocatable library.  The
                    file must be a binary file with the filecode NMOBJ.
                    When you want to include several relocatable object
                    files, you can name each file individually, or you
                    can provide an indirect file name containing a list
                    of object files by preceding that file name with a
                    caret symbol (^).

dest_file           Names the relocatable library where the relocatable
                    object modules are placed.  When dest_file is an
                    existing file, it must have the filecode NMRL.
                    Default:  the current relocatable library established
                    by the last BUILDRL or RL command.

MERGE               Directs the link editor to merge the relocatable
                    object modules into a single object module and then
                    add that module to the relocatable library.  The link
                    editor takes the name of the first object module it
                    encounters in the list of relocatable object files
                    and assigns that name to the relocatable object
                    module being built.  The examples, which follow, give
                    more details on how MERGE works.  Default:  create a
                    separate relocatable object module in the library for
                    each module in the relocatable object file.

rl_file             Names the relocatable library to use during MERGE
                    operations to resolve external references.  The file
                    must have a filecode of NMRL. When you want to
                    include several relocatable library files, you can
                    name each library individually, or you can provide an
                    indirect file name by preceding that file name with
                    the caret symbol (^).  Default:  do not use a
                    relocatable library to resolve external references.

SHOW                Displays (on $STDLIST) the name of each relocatable
                    object module added to the relocatable library.  All
                    files specified in the FROM= and RL= parameters are
                    displayed.  Default:  do not display the names of
                    relocatable object modules.

REPLACE             Specifies that when symbols in the module being added
                    are duplicates of symbols in any module in the
                    destination library, then the modules with duplicate
                    symbols residing in the library are removed.  The new
                    module is added before any of the modules in the
                    library are removed.

Examples 

       LinkEd> ADDRL FROM=ARC,LINE,TANGENT

This command adds each of the relocatable object modules within the
relocatable object files ARC, LINE, and TANGENT as distinct relocatable
object modules to the current relocatable library.

When using ADDRL, you normally omit the MERGE parameter.  By omitting
MERGE, you create a separate relocatable object module in the relocatable
library corresponding to each relocatable object module in the object
file.  Figure 5-4  illustrates this.

[]
Figure 5-4. The ADDRL Command without the MERGE Option LinkEd> ADDRL FROM=LINEDRAW;TO=BOXDRAW;MERGE;RL=ARC,LINE;SHOW This command merges the relocatable object modules in the relocatable object file LINEDRAW, with the modules from the relocatable libraries ARC and LINE that resolve external references, then adds a single relocatable object module containing this code to the relocatable library BOXDRAW. The link editor also displays the name of each relocatable object module it processes during the MERGE operation. The MERGE parameter directs the link editor to combine all the relocatable object modules into a single module as shown in Figure 5-5 (*).
[]
Figure 5-5. The ADDRL Command with the MERGE Option During a MERGE operation, you can also provide a list of relocatable libraries for the link editor to search to resolve external references. For example, if a relocatable object file contains three relocatable object modules and these modules refer to two relocatable object modules within a relocatable library, the link editor combines all five relocatable object modules into one.


MPE/iX 5.0 Documentation