HP-UX Reference (11i v1 00/12) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man5/!!!intro.5
________________________________________________________________
___ ___
d
dld.sl(5) dld.sl(5)
details.
PA64 Dynamic Path List
For standard mode libraries (libraries built or linked with ld +std ), the dynamic loader will use
dynamic path searching to find shared libraries whose names appear in a library list of the program or
loaded shared libraries with no embedded / character. Dynamic path searching is enabled by default for
these standard mode libraries or executables. If ld +noenvvar is specified, the dynamic loader will not
look at any dyanmic path environment variables to find dependent shared libraries. This limits the
dynamic path searching to the value of rpath and the default directories /usr/lib/pa20_64 and
/usr/ccs/lib/pa20_64.
For compatibility mode libraries (libraries built or linked with ld +compat), the dynamic loader will only
do dynamic path searching for these libraries if they were linked with -l or -l: and one of these were
specified:
ld +s
ld +b
chatr +s enable
There are several ways to specify a dynamic path list :
By storing a directory path list in the executable using the +b path_list option to ld.
By not specifying
ld +b and letting the linker set the rpath value to a concatenation of the
ld
-L
path_list followed by the value of the environment variable LPATH followed by the default direc-
tories /usr/lib/pa20_64
and /usr/ccs/lib/pa20_64. This is for standard mode shared
libraries only.
By storing a directory path_list in the environment variables
LD_LIBRARY_PATH
and/or
SHLIB_PATH. For compatibility mode shared libraries and executables, the directory path_list
should only be put in the
SHLIB_PATH environment variable.
The path list is a list of one or more path names separated by colons (:). The dynamic path list will work
only for libraries specified with the -l or -l: options to ld. However, it can be enabled for libraries
specified with a full path name using the
-l option to chatr (see chatr(1)). If both
+s and +b are
used, their relative order on the command line indicates which path list will be searched first in compatibil-
ity mode. See the
+help option to ld(1) or the HP-UX Linker and Libraries User’s Guide manual for more
details.
The dynamic loader will use these rules when determining which dynamic path list to use:
If
ld +noenvvar was specified and ld +b and ld +compat were not specified, then the only
dynamic path searching that can be done is to look at the path_list in
rpath followed by the default
directories
/usr/lib/pa20_64 and
/usr/ccs/lib/pa20_64.
If
ld +compat was specified and ld +b and ld +s were not specified, no shared library is sub-
ject to dynamic path searching.
If the ld +compat and ld +b options are not specified, then the path_list in the
LD_LIBRARY_PATH environment variable is searched, followed by the path_list in the
SHLIB_PATH environment variable, followed by the path_list in rpath, followed by the default
directories /usr/lib/pa20_64
and /usr/ccs/lib/pa20_64.
If the
ld +compat, ld +b, and ld +s are specified, then use the relative ordering of
ld +b
and ld +s to determine if the dynamic loader should use the path_list in rpath before
SHLIB_PATH followed by library as specified in the library list. If ld +b is specified first, use the
path_list in
rpath first.
The rules change slightly when looking for dependent shared libraries.
For standard mode libraries, the path_list in the LD_LIBRARY_PATH environment variable is
searched first, followed by the path_list in the SHLIB_PATH environment variable, followed by the
value in the parent shared library’s rpath, followed by the default directories
/usr/lib/pa20_64 and /usr/ccs/lib/pa20_64
. The ancestors of a parent shared library
may contain a path_list in
rpath, but this is ignored when searching for dependent shared libraries
of this parent. Only the parent’s rpath is used.
For compatibility mode libraries, the search is the same as for parent shared libraries, except
rpath
can be passed from parent shared libraries to child dependent shared libraries to that child’s
Section 542 2 HP-UX Release 11i: December 2000
___
___