166/317
6 - STMicroelectronics Programming Tools
06-lyn
Caution: The linker is invoked with the list of object files (.OBJ)tobelinked,andifyouwish,
with the name of the resulting file (
.COD). The modules that define the absolute segment loca-
tions must be put in the list before those that use these segments. Failure to do so produces
an error message and the linker cannot produce the executable object file.
For the linker to succeed in generating an absolute executable object file, it must know all the
addresses of the relocatable objects. If the linker does not find the definition of the address of
an object across all the relocatable object files supplied to it as the input, it will produce an
error message and the linking process will fail. The same would occur if an object is defined
twice across two different relocatable object files.
Another kind of error that is only detected at link time, is when an external object is defined in
one source file as a one-byte address (a label with a
.b suffix) and the symbol happens to be
defined as global in another source file as a two-byte address (the label has a
.w suffix).
The linker invocation may specify the name of one or more library files. A library file is a pre-
assembled collection of object files from which the program being linked can pick one or more
pieces of code. This may be useful when code coming from existing (and well working) appli-
File3.obj
lyn.exe
File.sym
Relocatable object files
Memory usage map
Linker invocation :
"lyn file1+file2+file3, file"
File1.obj
File2.obj
File.map
File.grp
File.cod
Absolute object file
Segment map data base
Symbol table