1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="manual.css">
<TITLE>
The dynlink library: dynamic loading and linking of object files
</TITLE>
</HEAD>
<BODY >
<A HREF="manual040.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="manual042.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>
<H1 CLASS="chapter"><A NAME="htoc259">Chapter 27</A> The dynlink library: dynamic loading and linking of object files</H1>
The <TT>dynlink</TT> library supports type-safe dynamic loading and linking
of bytecode object files (<TT>.cmo</TT> and <TT>.cma</TT> files) in a running
bytecode program. Type safety is ensured by limiting the set of
modules from the running program that the loaded object file can
access, and checking that the running program and the loaded object
file have been compiled against the same interfaces for these modules.<BR>
<BR>
Programs that use the <TT>dynlink</TT> library simply need to link
<TT>dynlink.cma</TT> with their object files and other libraries.
Dynamic linking is available only to bytecode programs compiled with
<TT>ocamlc</TT>, not to native-code programs compiled with <TT>ocamlopt</TT>.<BR>
<BR>
<a HREF="libref/Dynlink.html"> Module <tt>Dynlink</tt>: dynamic loading of bytecode object files</a>
<BR>
<BR>
<BR>
<BR>
<HR>
<A HREF="manual040.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="manual042.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
|