DLL Programmer's Guide for TNS/E Systems

Advanced DLL Facility Controls
DLL Programmer’s Guide for TNS/E Systems527252-006
5-14
Controlling the Loader’s Search Path at Load Time
In either case, the loader’s search path that was defined at link time is augmented as
follows, where the paths identified at link-time were steps 2, 3, 6, and 7, as described
in The Link-Time-Defined Search Path of the Loader on page 2-17.
1. The directories or subvolumes specified at load time by
_RLD_FIRST_LIB_PATH.
2. The directories or subvolumes specified in -RLD_first_L options at link
time
3. The public libraries (DLLs)
4. The directory or subvolume that stores the program being loaded
5. The directories or subvolumes specified by _RLD_LIB_PATH at load time
6. The directories or subvolumes specified in -RLD_L options at link time
7. Following default locations:
32-bit process:
For OSS: /lib, /usr/lib, /usr/local/lib, and
/G/SYSTEM/ZDLL in the order of the paths specified here.
For Guardian: $SYSTEM.ZDLL
64-bit process:
For OSS: /lib64, /usr/lib64, /usr/local/lib64, /lib,
/usr/lib, /usr/local/lib, /G/SYSTEM/YDLL, and
/G/SYSTEM/ZDLL in the order of the paths specified here.
Steps 3, 4, and 7, the loader follows automatically.
Steps 2 and 6 were set up at link time.
Steps 1 and 5 are load-time additions.
Steps 1 and 2 are provided for completeness, but are rarely required and are not
recommended for routine use. Because the public libraries can be searched in a
memory table, but all other searches require messages to name servers or disk
processes, it is more efficient to start at step 3. The public libraries have unique names
(Z*DLL) that should not interfere with finding ordinary DLLs later.
Note that the path search order for finding libraries is irrelevant to symbol search order,
which depends upon the searchList order, developed from the libLists.
_RLD_FIRST_LIB_PATH and _RLD_LIB_PATH can be stated only once for loading
each program and its libraries, so you must specify all the desired search paths for
each of these two environmental variables or defines in a list of colon-separated path
names.