Chapter
II/Linking
Object Modules
Linking
Object Modules
and
Producing
a
Run
File .
The linker lets you
link
(combine) several separately produced
object modules and
run
them as one program.
It
produces one
relocatable load module, or
run
file
(also called
an
.exe
or execut-
able file).
Resolving
External
References
In
addition
to
containing
internal
references, modules
to
be
linked may contain "external references" (references to symbols
that
are
defined
in
the other modules). As
it
combines modules,
the linker resolves all external references (makes sure they
are
defined).
If
any external reference is not defined
in
the object
modules,
the
linker searches up to eight library files
for
the
definition.
Producing
a List File
The linker also produces a
list
file, which shows external refer-
ences resolved and displays any error messages.
The following diagram illustrates the various
parts
of the link-
er's operation:
: I
'-..:
I
~
I i
u
,
,
U
j
l..-'
. \
Linker
!
U
libraries
.lib
Up
to 8 libraries
can be searched
r-------l.----,
Used only
if
run
VM.TMP
file is larger
than
memory
236
Run file
.exe
listing
map
I
I
--..J
. I
~
!
~