DLL Programmer's Guide for TNS/E Systems
Essential DLL Facility Controls
DLL Programmer’s Guide for TNS/E Systems—527252-006
2-8
Linkfile Inputs
-all and -none are toggle options you can insert multiple times in the command
stream to set the mode for archives that are subsequently specified in the command
stream. You can also insert the same archive more than once in the command stream.
At the beginning of the command stream, the default mode is -none.
The following example brings into the link only those linkfiles in an archive called
archfile1 that resolve symbols at the time the linker has archfile1 open, since
-none is the undeclared mode at the beginning of the command stream.
eld linkfile1 linkfile2 archfile1 -dll -o mainout
If, instead, you want the linker to bring into the link all the linkfiles in
archfile1, insert the following:
eld linkfile1 linkfile2 -all archfile1 -dll -o mainout
In this case, -all remains in effect for the rest of the command stream that follows it.
Availability of Linkfiles from Archives
Regardless of how the linker finds an archive, that archive is opened and remains
open, with its linkfiles available for inclusion in your link, only while the linker processes
the token naming that archive. When the linker has finished processing that token and
has extracted the appropriate linkfiles for inclusion in your link, it closes that archive.
Thereafter, that archive’s other linkfiles and their symbol definitions, are no longer
available to your link unless you reopen that archive. If subsequently processed files
require symbols from this archive, they can be satisfied in any of the following ways:
Open the archive only after processing all the files that may need these symbols.
Reopen the archive again later, after processing the other files that may need
these symbols.
Open the archive with -all in effect, so that all its linkfiles are incorporated in the
link and all their symbols are subsequently available.
If you know ahead of time that a given symbol must be resolved later, insert
the -u <symbol name > option, where <symbol name> names that symbol.
Having seen this declaration, the linker incorporates the first linkfile it finds in the
archive that resolves <symbol name> into the link. -u is repeatable, and only
one symbol can be listed with each -u option.
Here is another way of solving the same issues:
If a first linkfile is supposed to get a symbol definition from an archive and if you
are unsure whether a second linkfile in the link also exports that symbol, then
insert the archive after the first linkfile and before the second linkfile.
Otherwise, insert the names of your archives at the end of your command stream,
so that these archives can address all the outstanding symbol references
generated by processing the command stream.










