User's Manual

Table 24 Parameters
DefinitionParameter
Used to construct a pathname to the shared library file.
If files contain a slash character (/), dlopen uses the file
file
argument itself as the pathname. If not, dlopen searches
a series of directories for file.
Any directories specified by the dynamic search path,
which is set by calling dlsetlibpath
Any directories specified by the environment variable
LD_LIBRARY_PATH.
Any directories specified by the variable SHLIB_PATH.
Any directories specified by the RPATH of the calling
load module.
The default library search path.
The current working directory.
DefinitionModeflags
Under this mode, only references to data
symbols are relocated when the library is
RTLD_LAZY
loaded. References to functions are not
relocated until a given function is invoked
for the first time. This mode results in better
performance, because a process may not
reference all of the functions in any given
shared object.
Under this mode, all necessary relocations
are performed when the library is first
RTLD_NOW
loaded. This can cause some wasted effort
if relocations are performed for functions
that are never referenced. But it is useful
for applications that need to know as soon
as an object is loaded that all symbols
referenced during execution are available.
The shared library's symbols are made
available for the relocation processing of
RTLD_GLOBAL
any other object. In addition, symbol
lookup using dlopen(0, mode) and an
associated dlsym() allows objects loaded
with RTLD_GLOBAL to be searched.
The shared library's symbols are made
available for relocation processing only to
RTLD_LOCAL
objects loaded in the same dlopen
invocation. If neither RTLD_GLOBAL nor
RTLD_LOCAL are specified, the default is
RTLD_LOCAL.
Displays verbose messages when binding
symbols.
RTLD_VERBOSE
Return Values
A successful dlopen call returns to the process a handle which the process can use on subsequent
calls to dlsym and dlclose. This value must not be interpreted in any way by the process.
The dlopen routine returns NULL under the following conditions:
file cannot be found.
file cannot be opened for reading.
The dlopen Shared Library Management Routines 149