Access to the dynamic linking loader provided
by the operative systemi as an expanded class,
useful to to avoid namespace polluting. If you
don't know what "name space pollutiong" is or
if you just don't care insert
DYNAMIC_LINKING_LOADER.
The main program accessible as a dynamic shared object.
Symbols will be searched in the main program, followed by all shared
libraries loaded at program startup, and then all shared libraries
loaded by with the flag RTLD_GLOBAL.
A newly allocated dynamic shared object (also known as "library")
located at a_filename.
If a_filename contains a slash ("/"),
then it is interpreted as a (relative or absolute) pathname.
Otherwise, the dynamic linker searches for the library as detailed
in ld.so(8) manpage.
If the library has dependencies on other shared libraries, then
these are also automatically loaded by the dynamic linker using the
same rules. This process may occur recursively, if those libraries
in turn have dependencies, and so on.
some_flags must contain one of the following two values:
rtld_lazy: Perform lazy binding. Only resolve symbols as the code
that references them is executed. If the symbol is never
referenced, then it is never resolved. (Lazy binding is only
performed for function references; references to variables are
always immediately bound when the library is loaded.)
rtld_now: all undefined symbols are immediatly resolved; if this
cannot be done Current will be invalid. This behaviour is forced
when the environment variable LD_BIND_NOW is set to a non-empty
string.
Zero of more of the following values may also be (logically) ORed in some_flags:
rtld_global: The symbols defined by this library will be made
available for symbol resolution of subsequently loaded libraries.
rtld_local: This is the converse of rtld_global, and the default if
neither flag is specified. Symbols defined in this library are not
made available to resolve references in subsequently loaded
libraries.
rtld_nodelete: (since glibc 2.2) Do no unloa the library when
Current is disposed. Consequently, the library's static variables
are not reinitialized if the library is reloaded with
new_dynamic_shared_object. This flag is not specified in
POSIX.1-2001.
rtld_deepbind: (since glibc 2.3.4) Place the lookup scope of the
symbols in this library ahead of the global scope. This means that a
self-contained library will use its own symbols in preference to
global symbols with the same name contained in libraries that have
already been loaded. This flag is not specified in POSIX.1-2001.
External references in the library are resolved using the libraries in that library's dependency list and any
other libraries previously opened with the RTLD_GLOBAL flag. If the executable was linked with the flag "-rdynamic" (or, synonymously, "--export-dynamic"), then the global symbols in the executable will also be used to
resolve references in a dynamically loaded library.
If the same library is loaded again with dlopen(), the same file handle is returned. The dl library maintains
reference counts for library handles, so a dynamic library is not deallocated until dlclose() has been called on
it as many times as dlopen() has succeeded on it. The _init() routine, if present, is only called once. But a
subsequent call with RTLD_NOW may force symbol resolution for a library earlier loaded with RTLD_LAZY.
Result will be Void in case of failure.
Only resolve symbols as the code that references them is executed. If the symbol is never referenced, then it is never resolved. (Lazy binding is only performed for function references; references to variables are always immediately bound when the library is loaded.)
If this value is specified, or the environment variable LD_BIND_NOW is set to a non-empty string, all undeined symbols in the library are resolved before dlopen() returns.
(since glibc 2.2) Do not unload the library during dlclose().
Consequently, the library's static variables are not reiniā tialized if the library is reloaded with dlopen() at a later time. This flag is not specified in POSIX.1-2001.
This can be used to test if the library is already resident (dlopen() returns NULL if it is not, or the library's handle if it is resident). This flag can also be used to promote the flags on a library that is already loaded. For example, a library that was previously loaded with RTLD_LOCAL can be re-opened with RTLD_NOLOAD | RTLD_GLOBAL. This flag is not specified in POSIX.1-2001.
(since glibc 2.3.4) Place the lookup scope of the symbols in this library ahead of the global scope.
This means that a self- contained library will use its own symbols in preference to global symbols with the same name contained in libraries that have already been loaded. This flag is not specified in POSIX.1-2001.