eld Manual

Table Of Contents
Binding of References
eld Manual527255-009
3-6
Presetting Loadfiles
There are several ways that the linker may find the import library that represents the
implicit libraries. Regardless of how the import library that represents the implicit
libraries is found, the linker always uses it the same way, placing it at the end of the
search list.
The linker may have found the import library that represents the implicit libraries from
the command stream, such as described in How the Linker Finds Its Input Files and
Creates the .liblist Section on page 2-12. The linker recognizes it as the import library
that represents the implicit libraries because it has the special DLL name
“__IMPLICIT_LIB__”. Note that it doesn’t matter where it was found in the command
stream, because it any case it is placed at the end of the search list.
In the previous paragraph, found “from the command stream” means that the linker
found it during the same process that the linker uses to find all the other DLLs, those
that come directly from the command stream and those found indirectly through entries
in liblists. If, during this process, an import library that represents the implicit libraries is
found more than once, the rules that are followed are the same as those followed when
that situation comes up for other DLLs. In particular, it is not an error, and the first
instance is the one that the linker will use, but if multiple occurrences of this library are
found via non-identical export digests then a warning will appear.
If the linker has not found the import library that represents the implicit libraries from
the command stream, it may also determine its name by a system call.
If the linker still has not found the import library that represents the implicit libraries, but
it has found a public DLL registry file the linker next looks for a file named zimpimp in
the same subvolume or directory as the public DLL registery file. On OSS, where case
matters, zimpimp is lower case. If that file does not exist, or the linker can’t open it for
reading, the linker continues processing.
If the linker finds the import library that represents the implicit libraries via the above
process, and successfully opens it, then eld reports an error if the file is not a DLL, or if
the DLL name within the file is not “__IMPLICIT_LIB__”.
If the linker has not found an import library that represents the implicit libraries by the
process described above, and has gotten to this point without considering it an error,
then the linker gives a warning message.
After constructing the search list the linker looks for each required symbol by searching
through each DLL in the list, stopping at the first DLL that exports a symbol of that
name. The address specified for the symbol in that DLL is the address that is used to
resolve references to the symbol. Or, if the relocation type says that the address of the
official function descriptor is required, the linker would require that the target symbol be
a procedure and then would fill in the address of the official function descriptor rather
than the address of the procedure itself.