Common Uses of HP Link Editor/XL

The most common w ays to use HP Link Editor/XL are to: Link one or more relocatable object ￿les.

Link relocatable object modules from a relocatable library .

Name executable modules from an executable library to be searc hed at load time. Obtain program ￿le information b y using the LISTPROG command.

Linking a Relocatable Object File

When you want to use ￿le names or run-time defaults that v ary from the defaults pro vided by the compiler, link a relocatable object ￿le y ourself, rather than ha ve it automatically link ed. (Run-time defaults include t ype checking levels, capability-class attributes, stac k size, and heap size.)

For example, you can compile, link, and execute a COBOL II/XL program named EX1SRC , by using the command

:COB85XLG EX1SRC

This command is equiv alent to invoking the following three commands:

:COB85XL EX1SRC

:LINK

:RUN $OLDPASS

Both of the methods giv en above use $OLDPASS for the relocatable object ￿le and for the executable program ￿le.

The example belo w shows how to compile and link the COBOL II/XL source ￿le, EX1SR C, using a di￿erent relocatable object ￿le and a di￿eren t executable program ￿le. The compiler creates the relocatable object ￿le named EX1OBJ , which the HP Link Editor/XL command LINK uses to create the executable program ￿le named EX1PROG . The second line of this example is the HP Link Editor/XL command line.

:COB85XL EX1SRC,EX1OBJ :LINK FROM=EX1OBJ;TO=EX1PROG

For a listing of the source ￿le named EX1PROG and examples of linking sev eral relocatable object ￿les at once, refer to Link Editor/XL Reference Manual (32650-90030).

HP Link Editor/XL 4-3