ld Manual
Introduction to ld
ld Manual—529650.001
1-20
Finding Libraries
If the -bstatic flag is specified, ld searches for an archive file. ld does not search 
for a library. If the archive file cannot be found, ld issues an error message.
If the -bdllsonly flag is specified, ld searches only libraries. When a library cannot 
be found, ld issues an error message.
Finding Libraries
The OSS version of ld searches for libraries in this order when resolving values 
specified for -l or -lib on page 2-14:
1. Locations specified by the current -first_l on page 2-12
2. Public libraries (installed by the system operator)
3. Locations specified by the current -L or -libvol on page 2-14
4. Default locations in the Guardian and OSS environments.
5. Default locations in the Guardian environment: $SYSTEM.ZDLL
The default locations are skipped when -nostdlib or -no_stdlib on page 2-17 is in effect, 
and public libraries are skipped when -bstatic on page 2-8 is used. (Archive libraries 
encountered in this case are reported as errors.)
Qualifying Simple File Names
A simple file name is a Guardian file identifier or an OSS path name without any 
directory components.
ld searches in each location for libraries by file name, based upon whether the 
specified file name is a simple name.
If the specified file name is a simple name, ld tries to open the specified file; if it 
cannot, it modifies the supplied value and tries to open a file with the modified name. 
(Simple names specified in the Guardian file system, /G, are not modified; ld uses 
only the supplied value.) The prefix lib and these suffixes are added to the specified 
name to create the modified name:
Guardian File Names
The Guardian version of ld does not modify a simple file name when searching for 
files.
.so To find a DLL, unless -bstatic is in effect
.srl To find a shared run-time library (SRL), unless -bstatic
 is in effect
.a To find an archive file, unless -bdllsonly
 is in effect










