English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Native executable symtable
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-11-11 (12:09)
From: Luca Pascali <pasckosky2000@y...>
Subject: Re: [Caml-list] Native executable symtable
Keith Wansbrough wrote:

>The brute-force way is to make sure that you know one of the values in
>the table (the CRC of an unchanging module, say), and then just scan
>through the executable searching for that value as a bit-pattern.
>Once you find it, scan back until you find the CRC header, and you're
>done.  Ugly, but it will work on pretty much any platform (unless the
>executable is compressed or encrypted).
>--KW 8-)
Ok. Sounds fine.
But for the application we thought is not applicable.

We need those CRCs to for making a signature exchange for a 
client-server communication via socket.
We chosen to use marshalling (instead of pretty printing and parsing) to 
vehicle data on the communication channel, and as you know marshalling 
is not type-safe.

To enforce this type-safety, we thought to exchange those signatures to 
know if structures are taken from the same library or not (the same job 
Dynlink does when you ask to load a file).

So we do not know those values, and we cannot search for them in the file.
It will be more useful for us to know where to find those values in the 
natively compiled file and if this solution is cross platform or not.


Luca Pascali

Baretta DE&IT
A division of Baretta SRL

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

Our technology: