Creating Executable Program Files

The MPE/iX command :LINK creates a load module (an executable program ￿le). The :LINK command invokes Link Editor, whic h is an MPE/iX subsystem that prepares compiled programs for execution and main tains libraries. When in voked by using :LINK , Link Editor resolves external references in relocatable object modules b y merging relocatable object modules to produce an executable program ￿le con taining all of the code and data that w as in the relocatable object modules.

It assigns ￿nal addresses to eac h symbol (for a variable or procedure) to ensure that none overlap each other in the executable program ￿le. These addresses are called virtual addresses, because they are still subject to a ￿nal relocation when the program is loaded in to physical memory. Once virtual addresses are determined, Link Editor can resolv e many of the references that could not be resolv ed at compile time, because the sym bol tables from all of the relocatable object modules ha ve been merged to one table. Y ou can specify the relocatable libraries to searc h for unresolv ed references at link time. An y remaining external calls m ust be resolved at load time.

:LINK parameters can specify indirect ￿les. An indirect ￿le is a ￿le list con tained in an ASCII ￿le. For example, in the :LINK command, an indirect ￿le can be used to specify one of the following lists:

Files to link

Relocatable libraries (RLs) to merge

Executable libraries (XLs) names to put in a program header

For an overview of Link Editor, refer to Chapter 4. F or detailed information on :LINK and Link Editor, refer to Link Editor/XL Reference Manual (32650-90030).

You can request options at link time to: Produce a program ￿le map.

Search speci￿ed relocatable libraries (RLs) for an y required code not found in the relocatable object module.

Give the executable program ￿le certain privileges and capabilities.

Symbol Listing

Example 3-1 sho ws a source ￿le named EX1SRC . An executable program ￿le has been created for EX1SRC named EX1PROG .

Program Development 3-9