ADDXL [ HP Link Editor/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Link Editor/XL Reference Manual
ADDXL
This command adds relocatable object modules to an executable library
from either a relocatable object file or a relocatable library.
Syntax
ADDXL FROM= source_file [ ,source_file]...
[;TO= dest_file]
[;MERGE [;RL= rl_file [, rl_file]...]]
[;SHOW]
[;PARMCHECK= check_level]
[;PRIVLEV= priv_level]
[;XLEAST= xleast_level]
[;MAP]
[;REPLACE]
[;ENTRY= entry_name [ ,entry_name]...]
[;MODULE= module_name [ ,module_name]...]
[;BLOCKDATA= blockdata_name [, blockdata_name]...]
[;LSET= lset_name [ ,lset_name]...]
[;NODEBUG]
Parameters
source_file Names either a relocatable object file (from a
compiled source file) or a relocatable library file
that contains the relocatable object modules you want
to add to the executable library. The file must have
a filecode of NMOBJ or NMRL. When you want to include
several files, you can name each file individually,
or you can use an indirect file name containing a
list of the file names you want to include. Precede
the indirect file name with a caret symbol (^). Note
that you must supply at least one file name since the
FROM= parameter is required.
dest_file Names the executable library where the link editor
places the executable modules. When dest_file is an
existing file, it must have the filecode NMXL.
Default: the modules are placed in the executable
library used in the last XL or BUILDXL command.
MERGE Directs the link editor to merge all the relocatable
object modules together producing a single executable
module in the executable library. The link editor
uses the first relocatable object module name that it
merges as the name for the new module in the library.
The examples, which follow, explain MERGE in more
detail. Default: do not merge relocatable object
modules.
rl_file Names a relocatable library that the link editor
searches during a MERGE operation to resolve external
references. The file must have an NMRL filecode.
When you want to include several relocatable library
files, you can name each library individually, or you
can provide an indirect file name containing a list
of file names. Precede the indirect file name with a
caret symbol (^). Default: no relocatable library
is used.
SHOW Displays (on $STDLIST) the name of each relocatable
object module as it is merged into the executable
library. Use this parameter to verify the order in
which the link editor processes each module.
Default: do not display relocatable object modules.
check_level Determines the type checking error level that the
link editor uses while binding external references to
procedures and global variables. All relocatable
object modules indicate a checking level for each
reference and each definition of a procedure or a
global variable. When binding an external reference
to a definition, the link editor compares the type
information at the lower of the two checking levels
specified by the reference and the definition. If a
type mismatch is found, it is either a warning or an
error. This option determines which type mismatches
are warnings and which are errors. The check_level
entries are:
0 - All type mismatches are warnings.
1 - Mismatches of the procedure,
function or variable type are
errors. All other mismatches are
warnings.
2 - Mismatches of the procedure,
function or variable type and
mismatches of the number of
arguments for procedures or
functions are errors. All other
mismatches (parameter types, for
example) are warnings.
3 - All type mismatches are errors.
Default: 3.
priv_level Determines the privilege level of all entry points in
the executable module. This parameter changes the
privilege level of all procedures in the symbol and
export tables (of the relocatable object file) that
were set during compilation.
The priv_level entries are:
0 - System level access
1 - Unused
2 - Privileged level access
3 - User level access
Default: the privilege levels set during compilation
by compiler directives.
xleast_level Determines the privilege level at which calling
procedures must be executing to use the executable
module. Enter a value from zero to three (see the
values for the priv_level parameter, above).
Default: use the existing privilege levels of the
executable module.
MAP Prints a symbol map to the list file, LINKLIST, using
the same format as the LISTXL command. Default: Do
not print a symbol map.
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.
The next four parameters (ENTRY, MODULE, BLOCKDATA, and LSET) identify
the modules to add from the relocatable library. (Do not use these
parameters when the source_file is a relocatable object file.) You can
use any of the parameters alone, or you can use them in combination. If
you omit these parameters, the entire relocatable library is added.
entry_name Adds the module(s) that define (export) the symbolic
entry_name. You can enter an indirect file for this
parameter. Entry_name is case sensitive.
module_name Adds only those modules having the name, module_name.
If you do not use the RLFILE compiler directive, this
is the name of the source file from which the
relocatable object module was compiled. If you use
the RLFILE compiler directive, see the appropriate
language appendix (appendix B, C, D, or E) for the
definition of this name. You can enter an indirect
file for this parameter.
blockdata_name Adds only those modules having the name,
blockdata_name. Use this parameter only for HP
FORTRAN 77 block data subprograms. You can use an
indirect file name for blockdata_name.
lset_name Adds those modules that contain code belonging to the
locality set ( lset_name) that you enter. A module
can contain several locality sets, or there can be
several modules within a locality set. Each compiler
provides its own directives for placing procedures
into locality sets (check your language manual to see
if locality sets are available). You can enter an
indirect file for this parameter.
NODEBUG Specifies that all debugging information should be
stripped from the output object module before being
added to the executable library.
Examples
LinkEd> ADDXL FROM=FILEOPEN;TO=FILEREAD
This command takes the relocatable object modules from the relocatable
object file FILEOPEN and adds them to the FILEREAD executable library.
When you omit the MERGE parameter, the link editor links each relocatable
object module independently, then adds that module to the executable
library. It doesn't attempt to resolve references between modules or
library routines. Thus, each relocatable object module in the object
file has its counterpart in the executable library. Figure 6-4
illustrates this process.
Figure 6-4. The ADDXL Command without the MERGE Option
In this process, the ADDXL command duplicates the operation of the LINK
command as the link editor binds the relocatable object module to make it
executable. That is, the link editor assigns virtual addresses to all
symbols, binds references to the known symbols within each relocatable
object module, and puts the resulting executable module in a form that
the loader can process.
LinkEd> ADDXL FROM=FILEI0,FILEREAD,FILEWRIT;MERGE;RL=FILEUTIL
This command merges the relocatable object modules from the relocatable
object files FILEIO, FILEREAD and FILEWRIT, as well as using those
modules from the FILEUTIL relocatable library that resolve external
references, and then places a single executable module (called FILEIO)
into the current executable library.
By specifying the MERGE parameter, you can direct the link editor to
merge the relocatable modules into one executable module, resolving
references between them. (See Figure 6-5 .) In the same command, you
can also list the relocatable libraries to be searched to resolve
external references to library routines.
Figure 6-5. The ADDXL Command with the MERGE Option
MPE/iX 5.0 Documentation