]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/bytecomp/dll.mli
Inital import
[l4.git] / l4 / pkg / ocaml / contrib / bytecomp / dll.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                           Objective Caml                            *)
4 (*                                                                     *)
5 (*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
6 (*                                                                     *)
7 (*  Copyright 2001 Institut National de Recherche en Informatique et   *)
8 (*  en Automatique.  All rights reserved.  This file is distributed    *)
9 (*  under the terms of the Q Public License version 1.0.               *)
10 (*                                                                     *)
11 (***********************************************************************)
12
13 (* $Id: dll.mli 7656 2006-09-28 21:36:38Z xleroy $ *)
14
15 (* Handling of dynamically-linked libraries *)
16
17 (* Extract the name of a DLLs from its external name (xxx.so or -lxxx) *)
18 val extract_dll_name: string -> string
19
20 type dll_mode =
21   | For_checking     (* will just check existence of symbols;
22                         no need to do full symbol resolution *)
23   | For_execution    (* will call functions from this DLL;
24                         must resolve symbols completely *)
25
26 (* Open a list of DLLs.  First argument indicates whether to perform
27    full symbol resolution.  Raise [Failure msg] in case of error. *)
28 val open_dlls: dll_mode -> string list -> unit
29
30 (* Close all DLLs *)
31 val close_all_dlls: unit -> unit
32
33 (* The abstract type representing C function pointers *)
34 type dll_address
35
36 (* Find a primitive in the currently opened DLLs and return its address.
37    Raise [Not_found] if not found. *)
38 val find_primitive: string -> dll_address
39
40 (* If linking in core (dynlink or toplevel), synchronize the VM
41    table of primitive with the linker's table of primitive
42    by storing the given primitive function at the given position
43    in the VM table of primitives.  *)
44 val synchronize_primitive: int -> dll_address -> unit
45
46 (* Add the given directories at the head of the search path for DLLs *)
47 val add_path: string list -> unit
48
49 (* Initialization for separate compilation.
50    Initialize the DLL search path to the directories given in the
51    environment variable CAML_LD_LIBRARY_PATH, plus contents of ld.conf file
52    if argument is [false].  If argument is [true], ignore ld.conf. *)
53 val init_compile: bool -> unit
54
55 (* Initialization for linking in core (dynlink or toplevel).
56    Initialize the search path to the same path that was used to start
57    the running program (CAML_LD_LIBRARY_PATH + directories in executable +
58    contents of ld.conf file).  Take note of the DLLs that were opened
59    when starting the running program. *)
60 val init_toplevel: string -> unit
61