DLL Programmer's Guide for TNS/R Systems
Essential DLL Facility Controls
DLL Programmer’s Guide for TNS/R Systems—522203-002
2-7
Library Inputs
In this case, -include_whole 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 -include_whole 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 
symbolname option, where symbolname names that symbol. Having seen this 
declaration, the linker incorporates the first linkfile it finds in the archive that 
resolves symbolname into the link. -u is repeatable, and only one symbol can be 
listed with each -u option.
To keep things simple, you can safely ignore the foregoing rules by instead following 
two others:
•
If a given linkfile that is input to a link 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 that archive after the given 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.
While the archive is open (when -no_include_whole is in effect), the linker searches for 
symbols that are unresolved in the loadfiles seen so far, or specified by the -u option, 
or unresolved in linkfiles selected from the archive. The archive can have indirectly 
needed linkfiles. The linker finds them regardless of their order. (That is, the linker 
makes multiple passes over the archive while it has it open, if necessary to resolve 
symbols introduced by linkfiles in the archive.)
Library Inputs
In addition to linkfiles and archives, a loadfile being linked can also obtain symbol 
definitions from existing loadable libraries (DLLs and public hybrid SRLs). You must 
know which symbols the loadfile you are creating will import from existing libraries and 










