Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Bytecode object files structure
@ 2006-11-12 14:42 Pierre-Etienne Meunier
  2006-11-12 14:56 ` [Caml-list] " Alain Frisch
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pierre-Etienne Meunier @ 2006-11-12 14:42 UTC (permalink / raw)
  To: caml-list

Hi,

I'm trying to decrypt .cmo files produced by simple programs, such as
1+1;;
or
print_string "string";;
or
List.length [1;2;3;4;5];;

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 ?

Then, there's the address of what seems to be the last bytecode instruction.
Then, the bytecode instructions, as documented in opcodes.ml.

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 ?

Thanks,
P.E. Meunier (pierreetienne.meunier@ens-lyon.fr)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-13 11:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-12 14:42 Bytecode object files structure Pierre-Etienne Meunier
2006-11-12 14:56 ` [Caml-list] " Alain Frisch
2006-11-13  9:16 ` Yann Régis-Gianas
     [not found] ` <968382EE-B8CB-452C-A86F-684879E33798@free.fr>
2006-11-13 11:36   ` Pierre-Etienne Meunier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox