1995-08-09 08:06:35 -07:00
|
|
|
/***********************************************************************/
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Objective Caml */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/* Xavier Leroy, projet Cristal, INRIA Rocquencourt */
|
|
|
|
/* */
|
1996-04-30 07:53:58 -07:00
|
|
|
/* Copyright 1996 Institut National de Recherche en Informatique et */
|
1999-11-17 10:59:06 -08:00
|
|
|
/* en Automatique. All rights reserved. This file is distributed */
|
|
|
|
/* under the terms of the GNU Library General Public License. */
|
1995-08-09 08:06:35 -07:00
|
|
|
/* */
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
/* exec.h : format of executable bytecode files */
|
|
|
|
|
|
|
|
/* offset 0 ---> initial junk
|
1998-04-14 07:48:34 -07:00
|
|
|
path to runtime (if needed)
|
1995-05-04 03:15:53 -07:00
|
|
|
code block
|
1997-06-13 08:49:36 -07:00
|
|
|
names of primitives
|
1995-05-04 03:15:53 -07:00
|
|
|
data block
|
|
|
|
symbol table
|
|
|
|
debug infos
|
|
|
|
trailer
|
|
|
|
end of file --->
|
|
|
|
*/
|
|
|
|
|
1997-06-13 08:49:36 -07:00
|
|
|
/* Structure of the trailer.
|
|
|
|
Sizes are 32-bit unsigned integers, big endian */
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1998-04-14 07:48:34 -07:00
|
|
|
#define TRAILER_SIZE (6*4+12)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
struct exec_trailer {
|
1998-04-14 07:48:34 -07:00
|
|
|
unsigned int path_size; /* Length of path to runtime (w. final \n) */
|
1997-06-13 08:49:36 -07:00
|
|
|
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 */
|
1995-05-04 03:15:53 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Magic number for this release */
|
|
|
|
|
1998-04-14 07:48:34 -07:00
|
|
|
#define EXEC_MAGIC "Caml1999X004"
|
1995-05-04 03:15:53 -07:00
|
|
|
|