DLL Programmer's Guide for TNS/E Systems
Dynamic Use of DLLs
DLL Programmer’s Guide for TNS/E Systems—527252-006
3-4
dlopen’s Mode Parameter Values
RTLD_LAZY
This option is accepted to provide compatibility for UNIX, but is treated the same
as RTLD_NOW.
RTLD_GLOBAL
This option specifies that the newly loaded DLLs should be added to the
cumulative loadList, i.e. new libraries are added to the global set, which consists of
the program and libraries loaded initially by rld. This is the default.
RTLD_LOCAL
This option is accepted to provide compatibility for UNIX, but is treated the same
as RTLD_GLOBAL.
RTLD_NOLOAD
This option specifies that dlopen() should not load the target library, but should
provide a unique handle to it, if it is already loaded. This option causes dlopen()
to return a 0 if the library is not already loaded. Note that any handle returned by
dlopen() counts as a usage of the target library and until it is closed, the library
is not unloaded.
RTLD_VERBOSE(verbosity_level)
This option specifies the diagnostic output detail from calls to dynamic linking
functions regarding loading of library files, resolution of symbol names and search
details for files and symbols. The verbosity_level values are the same as
rld’s and are as follows:
0 - default (as though this specification is absent)
1 - none (no output to hometerm/stderr)
2 - warnings and errors
3 - also show files loaded
4 - also show symbol resolution
5 - same as 3, plus file search details
6 - same as 4, plus file search details
7 - same as 4, plus symbol search details
8 - all the above
dlopen() treats the mode parameter as the union of the above values and detects an
error if any other value is used. Valid combinations for the mode parameter include
both of the following:
Exactly one from the set of (RTLD_NOW | RTLD_LAZY | RTLD_NOLOAD)
No more than one from the set of (RTLD_GLOBAL | RTLD_LOCAL)
This means that if RTLD_NOLOAD is specified the user cannot set RTLD_NOW or
RTLD_LAZY, however, the user can, optionally, set RTLD_GLOBAL or RTLD_LOCAL.










