Improve the OOP ABI
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Fri Sep 29 13:56:52 UTC 2023
https://linux.die.net/man/3/dlopen
RTLD_NOW
If this value is specified, or the environment variable LD_BIND_NOW is
set to a nonempty string, all undefined symbols in the library are
resolved before dlopen() returns. If this cannot be done, an error is
returned.
That is fine, this is kinda what you should usually use to prevent
errors happening elsewhere (which won't be easily understood).
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_LOCAL basically isolates all exports from one shared library once
loaded from being matched to other shared library/executable externs.
This is probably what you want when loading plugins.
More information about the Digitalmars-d
mailing list