Entering HP Link Editor/XL Commands [ HP Link Editor/XL Reference Manual ] MPE/iX 5.0 Documentation
HP Link Editor/XL Reference Manual
Entering HP Link Editor/XL Commands
The following sections discuss the rules for entering HP Link Editor/XL
commands. (The link editor reads commands from the standard input file,
$STDINX. For more information on $STDINX see "The $STDINX File" section
in this chapter.)
Using Upper and Lower Case Characters
When entering HP Link Editor/XL commands, you can enter them in either
upper case or lower case, or a mixture of the two.
There is one instance when case is significant. You must enter entry
point (procedure) names exactly as they are found in the relocatable
object modules. You specify entry point names using the ENTRY parameter
of the following commands: LINK, COPYRL, EXTRACTRL, HIDERL, LISTRL,
PURGERL, REVEALRL, ADDXL, COPYXL, LISTXL and PURGEXL. In general, case
insensitive languages (including HP FORTRAN 77 and HP Pascal) convert
procedure names to lower case. For those languages, specify entry point
names in lower case.
Using Keyword or Positional Parameters
HP Link Editor/XL commands described in chapters 4, 5, and 6 are shown in
"keyword" form. That is, command parameters are preceded by a keyword
followed by an equal sign (=). For example, the relocatable object file
used by the LINK command is preceded by the FROM= keyword. You can enter
commands using keywords or without them (see the next paragraph). When
you use command keywords, you can enter command parameters in any order.
Separate keyword parameters by semicolons.
Under certain conditions, you can omit parameter keywords (and the equal
sign), and enter them in "positional" form. When you do this, you must
enter the parameters in the same order as shown in the command
description in this manual. Separate positional parameters by commas or
spaces.
You cannot use positional parameters:
* To specify a list of file names, unless the list is in an indirect
file. (See the section which follows in this chapter titled
"Using Indirect Files" for more information on indirect files.)
* After keyword parameters (keyword parameters must follow all
positional parameters).
The following three LINK commands use keywords and positional parameters
and are all equivalent:
LinkEd> LINK FROM=^OBJLIST; TO=PROGFILE; RL=LIBRL; MAP
LinkEd> LINK FROM=^OBJLIST; RL=LIBRL; MAP; TO=PROGFILE
LinkEd> LINK ^OBJLIST,PROGFILE,LIBRL; MAP
You can use a positional parameter without preceding it by previous
parameters for the command. You must supply the appropriate number of
commas to show that the parameters are omitted. The following command
uses default values for the first two parameters of the LINK command, but
specifies a value (LIBRL) for the third:
:LINK ,,LIBRL
Continuing Commands from One Line to Another
If you need more than one line to enter a command, end all lines except
the last with an ampersand (&).
This example shows how to enter a LINK command on three lines:
LinkEd> LINK FROM=SAMPOBJ1, SAMPOBJ2, SAMPOBJ3, SAMPOBJ4, SAMPOBJ5, &
SAMPOBJ6, SAMPOBJ7; TO=SAMPPROG; RL=LIBRL1, LIBRL2; &
XL=MYXL; MAP
Do not use ampersands in indirect files. (See the next section for
information about indirect files.)
Using Indirect Files
An indirect file is an ASCII file containing a list of names. You use
indirect file names in link editor commands instead of entering each name
contained in the file individually. (You can also mix indirect and
regular file names in commands.) Indirect files are a convenient way to
enter a long list of names for commands that you use frequently. You can
use indirect files only with the commands and their parameters shown
below (the parameters are shown in parentheses):
LINK (FROM=, RL=, and XL=)
ADDRL (FROM= and RL=)
COPYRL (ENTRY=, MODULE=, BLOCKDATA= and LSET=)
EXTRACTRL (ENTRY=, MODULE=, BLOCKDATA= and LSET=)
LISTRL (ENTRY=, MODULE=, BLOCKDATA= and LSET=)
PURGERL (ENTRY=, MODULE=, BLOCKDATA= and LSET=)
ADDXL (FROM=, RL=, ENTRY=, MODULE=, BLOCKDATA= and LSET=)
COPYXL (ENTRY=, MODULE=, BLOCKDATA= and LSET=)
LISTXL (ENTRY=, MODULE=, BLOCKDATA= and LSET=)
PURGEXL (ENTRY=, MODULE=, BLOCKDATA= and LSET=)
ALTPROG (PROG=)
When you create an indirect file, enter one or more names on each line
(you can use as many lines as necessary). Separate the names on each
line by spaces or commas. Make sure that the link editor has read access
to the file.
You can use comments in an indirect file. Use a pound sign (#) at the
beginning of a line or after a space to denote that the following
characters are part of a comment. Comments are ignored by the link
editor. If you want to use a pound sign as a character rather than to
denote the beginning of a comment, use double pound signs (##).
To use an indirect file in a command, precede its name by a caret (^).
For example, assume that the ASCII file, OBJLIST, contains these lines:
LIB1OBJ
LIB2OBJ
LIB3OBJ
LIB4OBJ
LIB5OBJ
The following commands use the indirect file, OBJLIST, to add the five
relocatable object files shown above to the relocatable library, LIBRL:
:LINKEDIT
LinkEd> BUILDRL RL=LIBRL
LinkEd> ADDRL FROM=^OBJLIST
LinkEd> EXIT
MPE/iX 5.0 Documentation