Top | ![]() |
![]() |
![]() |
![]() |
return capsule_shim_dlopen (cap Param1
,filename Param2
,flag Param3
);
A handle as if for dlopen
An implementation of dlopen suitable to be called from inside a
namespace. Load file
into cap
namespace.
If cap
has a non-trivial prefix, load file
and its recursive
dependencies from cap
prefix instead of from the root filesystem.
This helper function exists because dlopen()
cannot safely be called
by a DSO opened into a private namespace. It takes file
and flag
arguments cf dlopen()
and a cap
handle,
and performs a safe dlmopen()
call instead.
Typically this function is used to implement a safe wrapper for dlopen()
which is assigned to the int_dlopen member of the capsule_metadata.
This * replaces calls to dlopen()
by all DSOs in the capsule,
allowing libraries which use dlopen()
to work inside the capsule.
Limitations: RTLD_GLOBAL is not supported in flag
. This is a glibc
limitation in the dlmopen()
implementation.