HPlogo Getting Started as an MPE/iX Programmer Programmer's Guide: HP 3000 Computer MPE/iX Computer Systems > Chapter 4 HP Link Editor/XL

Creating an Executable Program File

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

HP Link Editor/XL creates executable program files from relocatable object files and relocatable libraries in the following way. First, it merges selected relocatable object files and libraries into one module and resolves inter-module references. Then, it searches selected relocatable libraries, resolving external references to symbols undefined after the merge operation. When a relocatable object module in the library resolves an external reference, the module is merged into the executable program file that is being built. In the last step, HP Link Editor/XL assigns virtual addresses to all symbols, binds references to the known symbols within each relocatable object module, and puts the resulting executable program in a form that the loader can process. Figure 4-3 “Creating an Executable Program File” shows the files HP Link Editor/XL uses when it creates an executable program file.

Figure 4-3 Creating an Executable Program File

[Creating an Executable Program File]

An executable program file contains only one program entry point, which marks the instruction where execution begins. Each language defines its own program entry point. For example, HP FORTRAN 77/iX uses the main program as the entry point, while HP Pascal/iX uses a program's outer block as the entry point. When creating an executable program file, HP Link Editor/XL separates code and data areas, as shown in Figure 4-4 “Linking to Create an Executable Program File”.

The functions of the LINK command are:

  • Binding

  • Merging relocatable object modules

  • Searching relocatable libraries (RLs)

Figure 4-4 Linking to Create an Executable Program File

[Linking to Create an Executable Program File]

Figure 4-5 “Executable Program File Commands” shows HP Link Editor/XL executable program file commands along with the files that they use.

Figure 4-5 Executable Program File Commands

[Executable Program File Commands]