DLL Programmer's Guide for TNS/E Systems
Essential DLL Facility Controls
DLL Programmer’s Guide for TNS/E Systems—527252-006
2-10
Files the Linker Opens Normally
If the linker is given a qualified file name inserted directly in the command stream,
it opens the file in the normal way for the linker host platform.
If the linker is given an unqualified file name inserted directly in the command
stream, it opens a file of that name in the current directory or subvolume.
If an unqualified file name is used in a -lib option, the linker searches for that file
following prescribed search paths, as discussed in Where The Linker Searches for
Libraries and Archives on page 2-11.
If a partially or fully qualified file name is used in a -lib option, the linker does not
search; it applies the host-system defaults to a partially qualified file name, and
attempts to open the file.
The linker can look for the file among the public libraries.
Files the Linker Opens Normally
The linker accesses files inserted directly in the command stream by making a single
attempt to open them, as described above. The linker recognizes and distinguishes
among a linkfile, an archive, and a DLL that it opens, and it handles each appropriately.
The following causes the linker to attempt to open linkfile1, linkile2, and
archfile1 normally in order to access their contents.
eld linkfile1 linkfile2 archfile1 -dll -o mainout
Libraries the Linker Searches For and Opens
To cause the linker to search for a file to bring into a link, insert the -lib <filename>
option. The file can be either an archive, which supplies linkfiles to incorporate into the
link, or a loadable library, which will be listed in the output loadfile’s libList. Only one
filename can follow a -lib option, so to declare multiple file names, use
multiple -lib option declarations. -lib is a repeatable option. -l <filename> is a
synonym for -lib <filename>, where the -l must be lowercase and may, but
need not, be separated from its filename parameter by white space.
The linker recognizes file names in a -lib (or -l) option as either qualified or
unqualified, as discussed in File-Name Qualification
on page 2-4. It accepts a qualified
name in a -lib option and does not search for it, but instead, attempts to open the file
as a library or archive; thus -lib qf is equivalent to a qf input as a separate file
name, when qf is qualified. If the linker cannot open a file with a qualified name it
declares an error and terminates the link. If the linker cannot open a file specified in a
-lib option with an unqualified name it declares an error, unless you have instructed
it to allow missing libraries, as described in Allowing Missing Libraries on page 2-12. It
is an error if a file opened as a result of -lib is not a library or an archive.
On the other hand, when the linker recognizes an unqualified name in a -lib option, it
searches the file system for a file with that name and opens it. Also, if the name in a
-lib option is unqualified, the linker might augment the given name with the defaults










