mollusk 019f8e3064 Add: julia-0.6.2
Former-commit-id: ccc667cf67d569f3fb3df39aa57c2134755a7551
2018-02-10 10:27:19 -07:00

17 lines
17 KiB
HTML

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Dynamic Linker · The Julia Language</title><script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-28835595-6', 'auto');
ga('send', 'pageview');
</script><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link href="../assets/highlightjs/default.css" rel="stylesheet" type="text/css"/><link href="../assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><a href="../index.html"><img class="logo" src="../assets/logo.png" alt="The Julia Language logo"/></a><h1>The Julia Language</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" action="../search.html"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="../index.html">Home</a></li><li><span class="toctext">Manual</span><ul><li><a class="toctext" href="../manual/introduction.html">Introduction</a></li><li><a class="toctext" href="../manual/getting-started.html">Getting Started</a></li><li><a class="toctext" href="../manual/variables.html">Variables</a></li><li><a class="toctext" href="../manual/integers-and-floating-point-numbers.html">Integers and Floating-Point Numbers</a></li><li><a class="toctext" href="../manual/mathematical-operations.html">Mathematical Operations and Elementary Functions</a></li><li><a class="toctext" href="../manual/complex-and-rational-numbers.html">Complex and Rational Numbers</a></li><li><a class="toctext" href="../manual/strings.html">Strings</a></li><li><a class="toctext" href="../manual/functions.html">Functions</a></li><li><a class="toctext" href="../manual/control-flow.html">Control Flow</a></li><li><a class="toctext" href="../manual/variables-and-scoping.html">Scope of Variables</a></li><li><a class="toctext" href="../manual/types.html">Types</a></li><li><a class="toctext" href="../manual/methods.html">Methods</a></li><li><a class="toctext" href="../manual/constructors.html">Constructors</a></li><li><a class="toctext" href="../manual/conversion-and-promotion.html">Conversion and Promotion</a></li><li><a class="toctext" href="../manual/interfaces.html">Interfaces</a></li><li><a class="toctext" href="../manual/modules.html">Modules</a></li><li><a class="toctext" href="../manual/documentation.html">Documentation</a></li><li><a class="toctext" href="../manual/metaprogramming.html">Metaprogramming</a></li><li><a class="toctext" href="../manual/arrays.html">Multi-dimensional Arrays</a></li><li><a class="toctext" href="../manual/linear-algebra.html">Linear algebra</a></li><li><a class="toctext" href="../manual/networking-and-streams.html">Networking and Streams</a></li><li><a class="toctext" href="../manual/parallel-computing.html">Parallel Computing</a></li><li><a class="toctext" href="../manual/dates.html">Date and DateTime</a></li><li><a class="toctext" href="../manual/interacting-with-julia.html">Interacting With Julia</a></li><li><a class="toctext" href="../manual/running-external-programs.html">Running External Programs</a></li><li><a class="toctext" href="../manual/calling-c-and-fortran-code.html">Calling C and Fortran Code</a></li><li><a class="toctext" href="../manual/handling-operating-system-variation.html">Handling Operating System Variation</a></li><li><a class="toctext" href="../manual/environment-variables.html">Environment Variables</a></li><li><a class="toctext" href="../manual/embedding.html">Embedding Julia</a></li><li><a class="toctext" href="../manual/packages.html">Packages</a></li><li><a class="toctext" href="../manual/profile.html">Profiling</a></li><li><a class="toctext" href="../manual/stacktraces.html">Stack Traces</a></li><li><a class="toctext" href="../manual/performance-tips.html">Performance Tips</a></li><li><a class="toctext" href="../manual/workflow-tips.html">Workflow Tips</a></li><li><a class="toctext" href="../manual/style-guide.html">Style Guide</a></li><li><a class="toctext" href="../manual/faq.html">Frequently Asked Questions</a></li><li><a class="toctext" href="../manual/noteworthy-differences.html">Noteworthy Differences from other Languages</a></li><li><a class="toctext" href="../manual/unicode-input.html">Unicode Input</a></li></ul></li><li><span class="toctext">Standard Library</span><ul><li><a class="toctext" href="base.html">Essentials</a></li><li><a class="toctext" href="collections.html">Collections and Data Structures</a></li><li><a class="toctext" href="math.html">Mathematics</a></li><li><a class="toctext" href="numbers.html">Numbers</a></li><li><a class="toctext" href="strings.html">Strings</a></li><li><a class="toctext" href="arrays.html">Arrays</a></li><li><a class="toctext" href="parallel.html">Tasks and Parallel Computing</a></li><li><a class="toctext" href="linalg.html">Linear Algebra</a></li><li><a class="toctext" href="constants.html">Constants</a></li><li><a class="toctext" href="file.html">Filesystem</a></li><li><a class="toctext" href="io-network.html">I/O and Network</a></li><li><a class="toctext" href="punctuation.html">Punctuation</a></li><li><a class="toctext" href="sort.html">Sorting and Related Functions</a></li><li><a class="toctext" href="pkg.html">Package Manager Functions</a></li><li><a class="toctext" href="dates.html">Dates and Time</a></li><li><a class="toctext" href="iterators.html">Iteration utilities</a></li><li><a class="toctext" href="test.html">Unit Testing</a></li><li><a class="toctext" href="c.html">C Interface</a></li><li><a class="toctext" href="libc.html">C Standard Library</a></li><li class="current"><a class="toctext" href="libdl.html">Dynamic Linker</a><ul class="internal"></ul></li><li><a class="toctext" href="profile.html">Profiling</a></li><li><a class="toctext" href="stacktraces.html">StackTraces</a></li><li><a class="toctext" href="simd-types.html">SIMD Support</a></li></ul></li><li><span class="toctext">Developer Documentation</span><ul><li><a class="toctext" href="../devdocs/reflection.html">Reflection and introspection</a></li><li><span class="toctext">Documentation of Julia&#39;s Internals</span><ul><li><a class="toctext" href="../devdocs/init.html">Initialization of the Julia runtime</a></li><li><a class="toctext" href="../devdocs/ast.html">Julia ASTs</a></li><li><a class="toctext" href="../devdocs/types.html">More about types</a></li><li><a class="toctext" href="../devdocs/object.html">Memory layout of Julia Objects</a></li><li><a class="toctext" href="../devdocs/eval.html">Eval of Julia code</a></li><li><a class="toctext" href="../devdocs/callconv.html">Calling Conventions</a></li><li><a class="toctext" href="../devdocs/compiler.html">High-level Overview of the Native-Code Generation Process</a></li><li><a class="toctext" href="../devdocs/functions.html">Julia Functions</a></li><li><a class="toctext" href="../devdocs/cartesian.html">Base.Cartesian</a></li><li><a class="toctext" href="../devdocs/meta.html">Talking to the compiler (the <code>:meta</code> mechanism)</a></li><li><a class="toctext" href="../devdocs/subarrays.html">SubArrays</a></li><li><a class="toctext" href="../devdocs/sysimg.html">System Image Building</a></li><li><a class="toctext" href="../devdocs/llvm.html">Working with LLVM</a></li><li><a class="toctext" href="../devdocs/stdio.html">printf() and stdio in the Julia runtime</a></li><li><a class="toctext" href="../devdocs/boundscheck.html">Bounds checking</a></li><li><a class="toctext" href="../devdocs/locks.html">Proper maintenance and care of multi-threading locks</a></li><li><a class="toctext" href="../devdocs/offset-arrays.html">Arrays with custom indices</a></li><li><a class="toctext" href="../devdocs/libgit2.html">Base.LibGit2</a></li><li><a class="toctext" href="../devdocs/require.html">Module loading</a></li></ul></li><li><span class="toctext">Developing/debugging Julia&#39;s C code</span><ul><li><a class="toctext" href="../devdocs/backtraces.html">Reporting and analyzing crashes (segfaults)</a></li><li><a class="toctext" href="../devdocs/debuggingtips.html">gdb debugging tips</a></li><li><a class="toctext" href="../devdocs/valgrind.html">Using Valgrind with Julia</a></li><li><a class="toctext" href="../devdocs/sanitizers.html">Sanitizer support</a></li></ul></li></ul></li></ul></nav><article id="docs"><header><nav><ul><li>Standard Library</li><li><a href="libdl.html">Dynamic Linker</a></li></ul><a class="edit-page" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/doc/src/stdlib/libdl.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Dynamic Linker</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Dynamic-Linker-1" href="#Dynamic-Linker-1">Dynamic Linker</a></h1><p>The names in <code>Base.Libdl</code> are not exported and need to be called e.g. as <code>Libdl.dlopen()</code>.</p><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.dlopen" href="#Base.Libdl.dlopen"><code>Base.Libdl.dlopen</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">dlopen(libfile::AbstractString [, flags::Integer])</code></pre><p>Load a shared library, returning an opaque handle.</p><p>The extension given by the constant <code>dlext</code> (<code>.so</code>, <code>.dll</code>, or <code>.dylib</code>) can be omitted from the <code>libfile</code> string, as it is automatically appended if needed. If <code>libfile</code> is not an absolute path name, then the paths in the array <code>DL_LOAD_PATH</code> are searched for <code>libfile</code>, followed by the system load path.</p><p>The optional flags argument is a bitwise-or of zero or more of <code>RTLD_LOCAL</code>, <code>RTLD_GLOBAL</code>, <code>RTLD_LAZY</code>, <code>RTLD_NOW</code>, <code>RTLD_NODELETE</code>, <code>RTLD_NOLOAD</code>, <code>RTLD_DEEPBIND</code>, and <code>RTLD_FIRST</code>. These are converted to the corresponding flags of the POSIX (and/or GNU libc and/or MacOS) dlopen command, if possible, or are ignored if the specified functionality is not available on the current platform. The default flags are platform specific. On MacOS the default <code>dlopen</code> flags are <code>RTLD_LAZY|RTLD_DEEPBIND|RTLD_GLOBAL</code> while on other platforms the defaults are <code>RTLD_LAZY|RTLD_DEEPBIND|RTLD_LOCAL</code>. An important usage of these flags is to specify non default behavior for when the dynamic library loader binds library references to exported symbols and if the bound references are put into process local or global scope. For instance <code>RTLD_LAZY|RTLD_DEEPBIND|RTLD_GLOBAL</code> allows the library&#39;s symbols to be available for usage in other shared libraries, addressing situations where there are dependencies between shared libraries.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L68-L91">source</a><br/></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.dlopen_e" href="#Base.Libdl.dlopen_e"><code>Base.Libdl.dlopen_e</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">dlopen_e(libfile::AbstractString [, flags::Integer])</code></pre><p>Similar to <a href="libdl.html#Base.Libdl.dlopen"><code>dlopen</code></a>, except returns a <code>NULL</code> pointer instead of raising errors.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L100-L104">source</a><br/></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.RTLD_NOW" href="#Base.Libdl.RTLD_NOW"><code>Base.Libdl.RTLD_NOW</code></a><span class="docstring-category">Constant</span>.</div><div><pre><code class="language-none">RTLD_DEEPBIND
RTLD_FIRST
RTLD_GLOBAL
RTLD_LAZY
RTLD_LOCAL
RTLD_NODELETE
RTLD_NOLOAD
RTLD_NOW</code></pre><p>Enum constant for <a href="libdl.html#Base.Libdl.dlopen"><code>dlopen</code></a>. See your platform man page for details, if applicable.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L32-L44">source</a><br/></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.dlsym" href="#Base.Libdl.dlsym"><code>Base.Libdl.dlsym</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">dlsym(handle, sym)</code></pre><p>Look up a symbol from a shared library handle, return callable function pointer on success.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L48-L52">source</a><br/></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.dlsym_e" href="#Base.Libdl.dlsym_e"><code>Base.Libdl.dlsym_e</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">dlsym_e(handle, sym)</code></pre><p>Look up a symbol from a shared library handle, silently return <code>NULL</code> pointer on lookup failure.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L58-L62">source</a><br/></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.dlclose" href="#Base.Libdl.dlclose"><code>Base.Libdl.dlclose</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">dlclose(handle)</code></pre><p>Close shared library referenced by handle.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L113-L117">source</a><br/></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.dlext" href="#Base.Libdl.dlext"><code>Base.Libdl.dlext</code></a><span class="docstring-category">Constant</span>.</div><div><pre><code class="language-none">dlext</code></pre><p>File extension for dynamic libraries (e.g. dll, dylib, so) on the current platform.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L175-L179">source</a><br/></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.find_library" href="#Base.Libdl.find_library"><code>Base.Libdl.find_library</code></a><span class="docstring-category">Function</span>.</div><div><pre><code class="language-none">find_library(names, locations)</code></pre><p>Searches for the first library in <code>names</code> in the paths in the <code>locations</code> list, <code>DL_LOAD_PATH</code>, or system library paths (in that order) which can successfully be dlopen&#39;d. On success, the return value will be one of the names (potentially prefixed by one of the paths in locations). This string can be assigned to a <code>global const</code> and used as the library name in future <code>ccall</code>&#39;s. On failure, it returns the empty string.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L122-L130">source</a><br/></section><section class="docstring"><div class="docstring-header"><a class="docstring-binding" id="Base.Libdl.DL_LOAD_PATH" href="#Base.Libdl.DL_LOAD_PATH"><code>Base.Libdl.DL_LOAD_PATH</code></a><span class="docstring-category">Constant</span>.</div><div><pre><code class="language-none">DL_LOAD_PATH</code></pre><p>When calling <a href="libdl.html#Base.Libdl.dlopen"><code>dlopen</code></a>, the paths in this list will be searched first, in order, before searching the system locations for a valid library handle.</p></div><a class="source-link" target="_blank" href="https://github.com/JuliaLang/julia/tree/d386e40c17d43b79fc89d3e579fc04547241787c/base/libdl.jl#L9-L14">source</a><br/></section><footer><hr/><a class="previous" href="libc.html"><span class="direction">Previous</span><span class="title">C Standard Library</span></a><a class="next" href="profile.html"><span class="direction">Next</span><span class="title">Profiling</span></a></footer></article></body></html>