forked from ocaml-flambda/flambda-backend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexec.h
46 lines (37 loc) · 1.83 KB
/
exec.h
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
/***********************************************************************/
/* */
/* Objective Caml */
/* */
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
/* */
/* Copyright 1996 Institut National de Recherche en Informatique et */
/* en Automatique. All rights reserved. This file is distributed */
/* under the terms of the GNU Library General Public License. */
/* */
/***********************************************************************/
/* $Id$ */
/* exec.h : format of executable bytecode files */
/* offset 0 ---> initial junk
path to runtime (if needed)
code block
names of primitives
data block
symbol table
debug infos
trailer
end of file --->
*/
/* Structure of the trailer.
Sizes are 32-bit unsigned integers, big endian */
#define TRAILER_SIZE (6*4+12)
struct exec_trailer {
unsigned int path_size; /* Length of path to runtime (w. final \n) */
unsigned int code_size; /* Size of the code block (in bytes) */
unsigned int prim_size; /* Size of the primitive table (in bytes) */
unsigned int data_size; /* Size of the global data table (bytes) */
unsigned int symbol_size; /* Size of the symbol table (bytes) */
unsigned int debug_size; /* Size of the debug infos (bytes) */
char magic[12]; /* A magic string */
};
/* Magic number for this release */
#define EXEC_MAGIC "Caml1999X005"