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

Guardian Native C Library Calls (a - e) dlopen(3)
RTLD_VERBOSE(n)
Species the amount and kind of debugging information to pro-
vide on the home terminal or standard error le when an error
occurs:
0 Perform the default behavior
1 Do not list warning or error messages on the
home terminal or the standard error le
2 List warning and error messages
3 List warning and error messages and les loaded
4 List warning and error messages, les loaded,
and symbol resolution
5 List warning and error messages, les loaded,
and le search details
6 List warning and error messages, les loaded,
symbol resolution, and le search details
7 List warning and error messages, les loaded,
symbol resolution, and symbol search details
8 List warning and error messages, les loaded,
symbol resolution, le search details, and sym-
bol search details
Combinations of the following are allowed:
Only one of RTLD_LAZY, RTLD_NOW, and RTLD_NO_LOAD
Only one of RTLD_GLOBAL and RTLD_LOCAL
RTLD_VERBOSE(n)
dlopen() treats the mode parameter as the sum of the specied values and
reports an error if any other value is used. Valid values for mode cannot evaluate
to 0 (zero).
DESCRIPTION
The dlopen() function invokes the rld loader to make a loadle available to a running process.
The library handle returned can be used by the dlsym( ) function to access external symbols
dened in the le. A library handle created using a NULL object_pathname can be destroyed by
dlclose(), but that action has no affect on the loaded program.
A library handle is returned every time dlopen() is called successfully, even if the loadle is
already loaded in the process. Loadles that are already loaded in the process are not loaded
again.
Until the library handle is invalidated by a call to the dlclose() function, the library designated
by object_pathname and all the libraries that the object_pathname library requires remain
loaded. Any library handle returned by dlopen( ) counts as a usage of the target library and any
libraries it requires; until the last handle is invalidated by the dlclose() function, the library is not
unloaded.
A usage count is maintained for each library. The usage count is incremented by calls to
dlopen() and decremented by calls to dlclose(). Once the usage count indicates that a library
has become unused, it is unloaded.
527192-005 Hewlett-Packard Company 153