COBOL Manual for TNS and TNS/R Programs
Issues Related to Binding and Linking
HP COBOL Manual for TNS and TNS/R Programs—522555-006
24-8
Loadfiles, Linkfiles, and Processes
Unresolved References
If an external reference in an object file refers to an entry point that is not among the
code blocks in that object file, the external reference is called unresolved. Unresolved
external references cause warning messages, but are allowed. They are expected to
be resolved by the fixup operation of the system loader. If the compiler cannot resolve
an external reference to a non-COBOL routine, it must at least be able to validate it.
When the compiler processes a CALL statement that calls another COBOL program,
but cannot find the other COBOL program, it delivers a warning message and
produces an object file.
When the compiler processes an ENTER statement that calls a routine, but cannot find
the routine, it delivers an error message and does not produce object code for the
calling program. The reason that the compiler cannot produce object code for the
calling program is that the compiler is unable to verify that the parameters of the call
match those expected by the routine (and, where necessary, to generate code that
converts parameters in the HP COBOL program into the form required by the routine).
For more information, see:
•
How the Compiler Resolves Unqualified References
•
How the Compiler Resolves Unqualified References.
Loadfiles, Linkfiles, and Processes
The single object file that results from binding or linking is a loadfileloadfile if exactly
one program in it is a main program; otherwise, it is a linkfile
A single execution of a loadfileloadfile is called a process. The operating environment
creates a process by loading a loadfileloadfile into memory, creating entries for the
process in various operating environment tables, and transferring control to the entry
point of the main routine of the process.
In memory, a process occupies code spaces, data spaces, and a process file segment.
The code spaces and data spaces (memory areas) are described in Table 13-2
. The
process file segment is an extended data segment available only to the operating
environment, which uses it for things such as managing the status of communication
with files.
Fixup
The first time you instruct the operating environment to execute a loadfile as a process,
the system loader performs a fixup operation on the file and attempts to resolve all
unresolved external references.