-
-
Notifications
You must be signed in to change notification settings - Fork 9
unix dlfcn
IsaacShelton edited this page Nov 13, 2022
·
5 revisions
unix/dlfcn.adept
contains definitions from <dlfcn.h>
.
foreign dlclose(ptr) int
foreign dlerror() *ubyte
foreign dlopen(*ubyte, int) ptr
foreign dlsym(ptr, *ubyte) ptr
define RTLD_LAZY = 0x1
define RTLD_NOW = 0x2
define RTLD_LOCAL = 0x4
define RTLD_GLOBAL = 0x8
#if __macos__
RTLD_NOLOAD == 0x10
RTLD_NODELETE == 0x80
RTLD_FIRST == 0x100
RTLD_NEXT == -1 as ptr
RTLD_DEFAULT == -2 as ptr
RTLD_SELF == -3 as ptr
RTLD_MAIN_ONLY == -5 as ptr
struct dl_info (
dli_fname *ubyte,
dli_fbase ptr,
dli_sname *ubyte,
dli_saddr ptr
)
alias Dl_info = dl_info
foreign dladdr(ptr, *Dl_info) int
#end