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

dlopen(3) Guardian Native C Library Calls Reference Manual
NAME
dlopen - Opens a dynamic-link library loadle from a running process
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZRLDSRL
G-series native OSS processes: /G/system/sysnn/zrldsrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZRLDDLL
H-series OSS processes: /G/system/zdllnnn/zrlddll
SYNOPSIS
#include <dlfcn.h>
dlHandle dlopen (
const char *object_pathname,
int mode
);
PARAMETERS
object_pathname
Points to the null-terminated lename of the dynamic-link library (DLL) to be
opened. If object_pathname is NULL, the dlopen() function returns a library
handle that can be used with the dlsym() function to look for symbols in the pro-
gram and in other libraries that were loaded with it.
A nonNULL value must be consistent with the execution environment (Guar-
dian or OSS). If the le is an OSS le, the value specied must be an OSS path-
name; if the le is a Guardian le, the value specied must be a Guardian
lename.
mode Any valid combination of the following mode options:
RTLD_NOW Performs all linking on the newly loaded library immediately.
This is a default value.
RTLD_LAZY Treated the same as RTLD_NOW. If either value is used,
dlopen() uses RTLD_NOW. This option is accepted to provide
compatibility with UNIX platforms.
RTLD_GLOBAL
The newly loaded DLLs should be added to the cumulative
loadList; that is, new libraries are added to the global set, which
consists of the program and libraries loaded initially by rld.
This is a default value.
RTLD_LOCAL
Treated the same as RTLD_GLOBAL. If either value is used,
dlopen() uses RTLD_GLOBAL. This option is accepted to
provide compatibility with UNIX platforms.
RTLD_NOLOAD
Species that dlopen( ) should not load the target library, but
should provide a unique library handle for it if the library is
already loaded. This option causes dlopen( ) to return a 0 (zero)
if the library is not already loaded.
When RTLD_NOLOAD is specied, you cannot specify
RTLD_NOW or RTLD_LAZY.
152 Hewlett-Packard Company 527192-005