parent
64d629c617
commit
450a3e3179
2 changed files with 7 additions and 1 deletions
|
|
@ -454,6 +454,9 @@ Define Effect
|
|||
path for the ``sh`` binary, in cases where it is not
|
||||
located in the default location ``/bin/sh``.
|
||||
``noSignalHandler`` Disable the crash handler from ``system.nim``.
|
||||
``globalSymbols`` Load all ``{.dynlib.}`` libraries with the ``RTLD_GLOBAL``
|
||||
flag on Posix systems to resolve symbols in subsequently
|
||||
loaded libraries.
|
||||
====================== =========================================================
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,10 @@ when defined(posix):
|
|||
dlclose(lib)
|
||||
|
||||
proc nimLoadLibrary(path: string): LibHandle =
|
||||
result = dlopen(path, RTLD_NOW)
|
||||
let flags =
|
||||
when defined(globalSymbols): RTLD_NOW or RTLD_GLOBAL
|
||||
else: RTLD_NOW
|
||||
result = dlopen(path, flags)
|
||||
when defined(nimDebugDlOpen):
|
||||
let error = dlerror()
|
||||
if error != nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue