DLL Programmer's Guide for TNS/R Systems
DLL Programmer’s Guide for TNS/R Systems—522203-002
5-1
5
Advanced DLL Facility Controls
This section tells how you can manually override and extend previously described 
linker and loader defaults and options to meet special needs. These advanced options 
fall loosely into four categories that compose the major headings in this section:
•
Linker Input Controls
•
Linker Output Controls
•
Link-Time Operation
•
Load-Time Operation
Linker Input Controls
Specifying Which Inputs Go into a Link on page 2-5 describes the essential controls 
over linker inputs. This section covers less usual situations where more precise control 
over inputs is needed.
Making the Linker Accept Only DLLs or Only Archives 
The following options act as a three-way switch that sets the mode for processing 
subsequent items in the command stream. They allow you to constrain the class of 
files the linker accepts in a link operation:
These options can be inserted multiple times, and each time, the option sets the mode 
for processing subsequent input-file names in the command-stream, until another of 
these options appears and changes the mode again. At the beginning of the command 
stream, the undeclared mode is -b dynamic. The following examples illustrate error 
conditions that can occur when the linker opens a file named either directly on the 
command line or in a -lib option.
•
If -b static is in effect and the file is a DLL, the linker terminates in error.
•
If -b dllsonly is in effect and the file is an archive, the linker terminates in 
error.
Option Constraint on Linker
-b static Accept only archives, not DLLs
-b dllsonly Accept only DLLs, not archives
-b dynamic Accept both archives and DLLs










