]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/byterun/startup.h
Inital import
[l4.git] / l4 / pkg / ocaml / contrib / byterun / startup.h
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 GNU Library General Public License, with    */
10 /*  the special exception on linking described in file ../LICENSE.     */
11 /*                                                                     */
12 /***********************************************************************/
13
14 /* $Id: startup.h 6130 2004-02-22 15:07:51Z xleroy $ */
15
16 #ifndef CAML_STARTUP_H
17 #define CAML_STARTUP_H
18
19 #include "mlvalues.h"
20 #include "exec.h"
21
22 CAMLextern void caml_main(char **argv);
23
24 CAMLextern void caml_startup_code(
25            code_t code, asize_t code_size,
26            char *data, asize_t data_size,
27            char *section_table, asize_t section_table_size,
28            char **argv);
29
30 enum { FILE_NOT_FOUND = -1, BAD_BYTECODE  = -2 };
31
32 extern int caml_attempt_open(char **name, struct exec_trailer *trail,
33                              int do_open_script);
34 extern void caml_read_section_descriptors(int fd, struct exec_trailer *trail);
35 extern int32 caml_seek_optional_section(int fd, struct exec_trailer *trail,
36                                         char *name);
37 extern int32 caml_seek_section(int fd, struct exec_trailer *trail, char *name);
38
39
40 #endif /* CAML_STARTUP_H */