nld and noft Manual

nld Utility
nld and noft Manual520384-003
2-27
Searching for Archives and SRLs With Simple
Filenames
Searching for Archives and SRLs With Simple
Filenames
A simple name is a Guardian file identifier or an OSS pathname without any directory
components.
By default, nld searches a standard set of library locations for archive files and SRLs
specified with simple names in the option -l or -lib on page 3-7. You can stop nld from
searching the standard library locations with the option -nostdlib on page 3-9. nld
does not search the standard library locations for archive files and SRLs specified with
simple names on the nld command line.
Each version of nld searches a particular set of standard library locations:
The Guardian version of nld searches for SRLs and archive files in the subvolume
with the current version of the operating system image (the active
$SYSTEM.SYSnn subvolume).
The OSS version of nld searches for SRLs and archive files in the following
standard library locations, in the order shown:
1. The directory with the current version of the operating system image (the active
/G/system/sysnn directory).
2. The /lib directory.
3. The /usr/lib directory.
4. The /usr/local/lib directory.
In the OSS environment, the value of the COMP_ROOT environment variable is
added to the beginning of /lib, /usr/lib, and /user/local/lib. By default,
the value of COMP_ROOT is null.
The Guardian version of nld does not modify the simple name. The OSS version of
nld modifies the simple name as follows:
In dynamic linking, nld first looks for a file named libFilename.srl and then for a
file named libFilename.a. In static linking, nld looks only for a file named
libFilename.a. nld follows this process in each directory it is searching before
moving on to the next directory.
Dynamic and static linking are controlled with the -bdynamic and -bstatic flags.
See Dynamic and Static Linking on page 2-28 for details.
Note. This subsection does not apply to the PC. On the PC, you must specify the location for
nld to look for SRLs and archives; there are no standard library locations.
Linking Specified Prefix Added to Simple Name Suffix Added to Simple Name
Dynamic lib .srl
Static lib .a