11# This file is a part of Julia. License is MIT: https://julialang.org/license
22
3+ __precompile__ (true )
4+
35module Libdl
46@doc """
57Interface to libdl. Provides dynamic linking support.
68""" -> Libdl
79
10+ import Base. DL_LOAD_PATH
11+
812export DL_LOAD_PATH, RTLD_DEEPBIND, RTLD_FIRST, RTLD_GLOBAL, RTLD_LAZY, RTLD_LOCAL,
913 RTLD_NODELETE, RTLD_NOLOAD, RTLD_NOW, dlclose, dlopen, dlopen_e, dlsym, dlsym_e,
1014 dlpath, find_library, dlext, dllist
@@ -15,11 +19,7 @@ export DL_LOAD_PATH, RTLD_DEEPBIND, RTLD_FIRST, RTLD_GLOBAL, RTLD_LAZY, RTLD_LOC
1519When calling [`dlopen`](@ref), the paths in this list will be searched first, in
1620order, before searching the system locations for a valid library handle.
1721"""
18- const DL_LOAD_PATH = String[]
19- if Sys. isapple ()
20- push! (DL_LOAD_PATH, " @loader_path/julia" )
21- push! (DL_LOAD_PATH, " @loader_path" )
22- end
22+ DL_LOAD_PATH
2323
2424# note: constants to match JL_RTLD_* in src/julia.h, translated
2525# to system-specific values by JL_RTLD macro in src/dlload.c
@@ -47,7 +47,6 @@ applicable.
4747""" ->
4848(RTLD_DEEPBIND, RTLD_FIRST, RTLD_GLOBAL, RTLD_LAZY, RTLD_LOCAL, RTLD_NODELETE, RTLD_NOLOAD, RTLD_NOW)
4949
50-
5150"""
5251 dlsym(handle, sym)
5352
0 commit comments