From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 7CC70BC0A for ; Sat, 5 May 2007 23:15:32 +0200 (CEST) Received: from v826.ncsrv.de (v826.ncsrv.de [89.110.147.75]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l45LFWhV026030 for ; Sat, 5 May 2007 23:15:32 +0200 Received: from localhost (M022P003.adsl.highway.telekom.at [62.47.170.163]) by v826.ncsrv.de (Postfix) with ESMTP id 0380C1F2F000E for ; Sat, 5 May 2007 23:15:29 +0200 (CEST) Date: Sat, 5 May 2007 23:15:57 +0000 From: Christoph Sieghart To: caml-list@yquem.inria.fr Subject: Ocaml .cmo fileformat before linking Message-ID: <20070505231556.GA911@harlekin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.5.14 (2007-02-12) X-Miltered: at concorde with ID 463CF3F4.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 cmo:01 ocaml:01 cmo:01 bytecode:01 bytecode:01 pointers:01 closures:01 compile:01 data:02 data:02 linking:02 linking:02 constraints:03 library:03 Hello list, I am writing an Ocaml interpreter for an embedded plattform (AVR) and now I am searching for any material concerning the structure of the .cmo files before linking happens. I compile my Ocaml files with ocaml -c myfile.ml an then extract the bytecode from there. I found documenation on the bytecode (I already have an interpreter running on my plattform - no gc, no floating point , no closures, no enviroment access) but not on the data that follows it in the .cmo file. The plan is to use the not linked .cmo files to extract the bytecode and the data from and to supply a minimal library in the interpreter, because I am operating under tight memory constraints. I would be glad for any pointers, best regards Christoph