caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Native executable symtable
@ 2004-11-11 10:18 Alex Baretta
  2004-11-11 10:39 ` [Caml-list] " Nicolas Cannasse
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Alex Baretta @ 2004-11-11 10:18 UTC (permalink / raw)
  To: Ocaml

We are writing a library implementing binary client-server protocol 
based on the Marshal module. In order to guarantee some degree of 
type-safety, during the handshaking phase of the communication we need 
the client to send the server the MD5 checksums of all relevant modules. 
The server process must verify that it has all the mentioned modules and 
that the checksums are consistent with its own.

We are currently generating MD5 checksums from our source files with the 
md5sum command. These checksums are then assembled into a new source 
file which is compiled and linked into the both executables. This 
process works coherently for byte and native code, but it has at least 
one important drawback: all relevant modules must be available as source 
files for the md5 source file generation to work. Besides, this makes 
the compilation process exceedingly complex.

We have found that the md5sum can be fetced directly from the executable 
file associated to the process. This technique is documented nowhere, as 
far as I can see, but the source code of Symtable.init_toplevel is very 
informative as to how to do this for bytecode executables. What I would 
like to know is how to implement this technique for native code 
executables. Essentially, how am I supposed to parse the binary 
executable to extract the symtable information. Also, how am I supposed 
to figure out at runtime whether I must use the bytecode method or the 
native code method? Equivalently, how do I know at runtime if the 
process is running a bytecode executable or a native one?

Thank you very much.

Alex


-- 
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. 02 370 111 55
fax. 02 370 111 54

Our technology:
http://www.asxcaml.org/
http://www.freerp.org/


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

end of thread, other threads:[~2004-11-22  3:25 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-11 10:18 Native executable symtable Alex Baretta
2004-11-11 10:39 ` [Caml-list] " Nicolas Cannasse
2004-11-11 11:09   ` Luca Pascali
2004-11-11 11:55     ` Keith Wansbrough
2004-11-11 12:09       ` Luca Pascali
2004-11-11 12:28         ` Keith Wansbrough
2004-11-11 12:42           ` Luca Pascali
2004-11-11 16:09             ` Richard Jones
2004-11-20 15:44               ` Luca Pascali
2004-11-20 16:03                 ` malc
2004-11-20 18:01                   ` Alex Baretta
2004-11-20 18:06                     ` malc
2004-11-20 18:53                       ` Alex Baretta
2004-11-20 19:17                         ` malc
2004-11-20 20:07                           ` Ritesh Kumar
2004-11-20 22:43                           ` The madness of ignoring people Vincenzo Ciancia
2004-11-20 23:10                             ` [Caml-list] " malc
2004-11-20 23:25                               ` Vincenzo Ciancia
2004-11-21 12:51                             ` skaller
2004-11-21 14:14                               ` Vincenzo Ciancia
2004-11-21 14:30                                 ` malc
2004-11-21  3:37                           ` [Caml-list] Native executable symtable skaller
2004-11-21 15:59                           ` Richard Jones
2004-11-21 20:29                             ` skaller
2004-11-21 20:39                               ` malc
2004-11-21 23:30                               ` Richard W.M. Jones
2004-11-22  3:25                                 ` skaller
2004-11-21 20:42                             ` Jean-Marie Gaillourdet
2004-11-21 18:31                               ` Ritesh Kumar
2004-11-21 23:33                                 ` Richard Jones
2004-11-21 21:15                               ` skaller
2004-11-11 16:23 ` David Brown
2004-11-11 17:27 ` Xavier Leroy
2004-11-11 18:48   ` Alex Baretta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).