Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

dlopen(3) Guardian Native C Library Calls Reference Manual
Symbol controls within the loadles affect a call to dlopen(); that is, the library designated by
object_pathname and each library it requires can be localized, globalized, or semi-globalized
itself, and its symbols are resolved accordingly.
dlopen() does not load licensed libraries.
Controlling the Loader Search Path
Users can specify the search path used to nd libraries without fully qualied le names. The
search path can be specied through path lists, either at link time or at run time. The path list (a
colon-separated sequence of path list elements) supplied at link and load time also applies to any
dlopen() invocations when that process is running. Each path list element is an OSS directory
pathname (for OSS processes) or a Guardian subvolume name (for Guardian processes).
The search path for the libraries that rld and dlopen( ) use is not used to search for public
libraries. Instead, the operating system makes public libraries available to rld and dlopen( ).
When building a loadle, users can specify a run-time path list at link time using the ld or eld
command. This information is stored in the .dynamic section of the object le as the values for
rpath and rpath_rst for use by rld and dlopen( ) at load time.
If rpath is absent or null, the default run-time path list is:
1. Public libraries
2. Program location
3. Default locations:
On OSS: /lib:/usr/lib:/usr/local/lib:/G/SYSTEM/ZDLL
On Guardian: $SYSTEM.ZDLL
The linker (ld or eld) can place path lists in the loadle, using the following options:
-rld_l path_list[:path_list]...
This option species one or more path lists for the run-time loader to look for
libraries
-rld_first_l path_list[:path_list]...
This option is like -rld_l except that it species places to look before looking in
the public libraries. The resulting path list is placed as a separate rpath_rst
item in the .dynamic section of the loadle.
The loader uses these path lists in the target environment. Invalid path list elements or path list
elements for locations without libraries are ignored, so the list can contain a mix of Guardian
subvolume names and OSS directory names.
At link time, the ld or eld command option -limit_runtime_paths can be specied to limit the
loaders path list at run time. When this option is specied, the items marked with an asterisk (*)
in the search lists described in this reference page are omitted from the search.
When the ld or eld loadle options are used, the run-time search path list becomes:
1. Locations specied by -rld_rst_l at link time (the value of rpath_rst)
2. Public libraries
3. Program location *
158 Hewlett-Packard Company 527192-007