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 */
|
|
|
|
|
2000-03-05 11:18:50 -08:00
|
|
|
/* Executable bytecode files are composed of a number of sections,
|
|
|
|
identified by 4-character names. A table of contents at the
|
|
|
|
end of the file lists the section names along with their sizes,
|
|
|
|
in the order in which they appear in the file:
|
|
|
|
|
|
|
|
offset 0 ---> initial junk
|
|
|
|
data for section 1
|
|
|
|
data for section 2
|
|
|
|
...
|
|
|
|
data for section N
|
|
|
|
table of contents:
|
|
|
|
descriptor for section 1
|
|
|
|
...
|
|
|
|
descriptor for section N
|
|
|
|
trailer
|
1995-05-04 03:15:53 -07:00
|
|
|
end of file --->
|
|
|
|
*/
|
|
|
|
|
2000-03-05 11:18:50 -08:00
|
|
|
/* Structure of t.o.c. entries
|
|
|
|
Numerical quantities are 32-bit unsigned integers, big endian */
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2000-03-05 11:18:50 -08:00
|
|
|
struct section_descriptor {
|
|
|
|
char name[4]; /* Section name */
|
|
|
|
uint32 len; /* Length of data in bytes */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Structure of the trailer. */
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
struct exec_trailer {
|
2000-03-05 11:18:50 -08:00
|
|
|
uint32 num_sections; /* Number of sections */
|
|
|
|
char magic[12]; /* The magic number */
|
|
|
|
struct section_descriptor * section; /* Not part of file */
|
1995-05-04 03:15:53 -07:00
|
|
|
};
|
|
|
|
|
2000-03-05 11:18:50 -08:00
|
|
|
#define TRAILER_SIZE (4+12)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
/* Magic number for this release */
|
|
|
|
|
2000-03-05 11:18:50 -08:00
|
|
|
#define EXEC_MAGIC "Caml1999X006"
|
1995-05-04 03:15:53 -07:00
|
|
|
|