DLL Programmer's Guide for TNS/E Systems
Essential DLL Facility Controls
DLL Programmer’s Guide for TNS/E Systems—527252-006
2-7
Specifying Which Inputs Go into a Link
Specifying Which Inputs Go into a Link
Primary inputs to a link are the individual linkfiles inserted by name in the command
stream. Other linkfiles can come from archives that are inserted in the command
stream; an archive is a file that contains one or more linkfiles. Input linkfiles are merged
in the link process to form the output loadfile. Other inputs to a link are libraries that the
output loadfile references directly or indirectly. The following subsections describe each
of these inputs in detail.
Linkfile Inputs
The linker’s main purpose is to combine linkfiles to produce a loadfile. You must insert
directly in the command stream the name of the linkfiles that are the primary inputs to
the link. The names of these linkfile inputs can be unqualified if the linkfile is in the
same subvolume or directory from which you invoke the linker or else they must be
fully qualified file names; they cannot be part of any option. These names can be
inserted anywhere as long as they do not separate another option from its parameters.
The linker always resolves symbol references in linkfiles being linked with symbol
definitions those linkfiles themselves provide. In particular, if a loadfile refers to a
symbol that it also exports, the linker binds that reference to that loadfile’s definition. If
the loadfile is localized, which the linker assigns by default, then at load time, the
loader will accept this resolution. If the loadfile is not localized, the loader may revise
the linker’s resolution, as discussed in Ambiguity Example 2 on page 4-9.
Selecting Linkfiles from Archives
Like named linkfiles, by inserting their qualified names, you can specify archives for the
linker to access. To learn how the linker searches for an archive, see Specifying Where
the Linker Can Find Its Inputs on page 2-9. Two options allow you to select which
linkfiles are brought into the link from an open archive:
Specify the name of the file in which to
store the result
Assign the file name with a -o option
Name the resulting DLL differently from
the output file
Assign the DLL name with the -dllname
option and the file name with a -o option.
Simultaneously give the same name to
the output DLL and the file it is stored in
Assign the name with a -o option and do not
use a -dllname option, or vice versa.
Linkfiles to Bring into the Link Option
Bring in all linkfiles in this archive. -all or the synonym -
include_whole
Bring in only those linkfiles that resolve
currently unresolved symbols.
-none or the synonym
-no_include_whole
To: Action:










