#include <qp2user.h> QP2_ptr64_t Qp2dlopen(const char *path, int flags, int ccsid);
Qp2dlopen() dynamically loads an i5/OS PASE module by calling the i5/OS PASE dlopen() function.
If the input path pointer is null, the function result is a value for the main application that lets you find symbols in the i5/OS PASE process global name space, which includes all symbols exported by the i5/OS PASE program and shared executables except those loaded by i5/OS PASE dlopen using option RTLD_LOCAL.
QP2_RTLD_NOW (0x00000002) | Load all dependents of the module being loaded
and resolve all symbols. Either QP2_RTLD_NOW or QP2_RTLD_LAZY must be
specified. |
QP2_RTLD_LAZY (0x00000004) | Allow the system to defer loading dependent
modules. Either QP2_RTLD_NOW or QP2_RTLD_LAZY must be specified. |
QP2_RTLD_GLOBAL (0x00010000) | Load the module into the global name space.
Exported symbols in the module will be visible in the main application and will
be used when resolving symbols used by other i5/OS PASE dlopen calls. |
QP2_RTLD_LOCAL (0x00080000) | Load the module into a local name space. This
option is the default when neither QP2_RTLD_GLOBAL nor QP2_RTLD_LOCAL is
specified. It prevents symbols in the module being loaded from being used when
resolving symbols used by other dlopen calls. |
QP2_RTLD_MEMBER (0x00040000) | Specifies that the path argument string
may contain the name of a member in an archive (shared library). |
QP2_RTLD_NOAUTODEFER (0x00020000) | Prevent deferred imports in the module being loaded from being automatically resolved by subsequent loads. |
Object Referred to | Authority Required |
---|---|
Each directory in the path to the i5/OS PASE module | *X |
i5/OS PASE module | *R |
Sucessful completion returns a non-zero function result that can be used to call APIs Qp2dlsym and Qp2dlclose (and also i5/OS PASE functions dlsym and dlclose). Resources allocated for the function result are not freed until the i5/OS PASE program ends or the value is passed to API Qp2dlclose (or i5/OS PASE dlclose).
A zero function result indicates an error. The caller can check ILE errno or i5/OS PASE errno (if ILE errno is zero), or call the Qp2dlerror API for more information about the error.
Top | i5/OS PASE APIs | APIs by category |