Version française
Home     About     Download     Resources     Contact us    
Browse thread
Bytecode object files structure
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <Alain.Frisch@i...>
Subject: Re: [Caml-list] Bytecode object files structure
Pierre-Etienne Meunier wrote:
> According to the source of Ocaml, there's something called the 
> "cmo_magic_number", systematically written at the beginning of all .cmo 
> files. Does it have a real function for executing the programs, or is it just 
> a way to make sure the file contains ocaml bytecode ?

It is just a way to make sure that the file contains ocaml bytecode with
the expected version.

> After that, I can't understand anything : there vaguely seems to be some 
> information related to linking or so... What is the precise structure of this 
> part ? Is there some kind of a bytecode assembler ?

The structure is a compilation unit descriptor, described in
bytecomp/cmo_format.mli.

-- Alain