From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 3FA38BB81 for ; Thu, 11 Nov 2004 13:09:34 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iABC9XfO020063 for ; Thu, 11 Nov 2004 13:09:34 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA09563 for ; Thu, 11 Nov 2004 13:09:33 +0100 (MET) Received: from mail.barettadeit.com (h213-255-109-130.albacom.net [213.255.109.130] (may be forged)) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iABC9WrP005632 for ; Thu, 11 Nov 2004 13:09:33 +0100 Received: from [10.0.0.115] (table [10.0.0.115]) by mail.barettadeit.com (Postfix) with ESMTP id B8826802865F for ; Thu, 11 Nov 2004 13:09:32 +0100 (CET) Message-ID: <4193567C.1040905@yahoo.it> Date: Thu, 11 Nov 2004 13:09:32 +0100 From: Luca Pascali User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Native executable symtable References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4193567D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4193567C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 symtable:01 wrote:01 marshalling:01 parsing:01 marshalling:01 type-safe:01 type-safety:01 dynlink:01 baretta:01 baretta:01 structures:01 signatures:01 natively:01 native:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.6 required=5.0 tests=FORGED_RCVD_HELO, FROM_ENDS_IN_NUMS autolearn=disabled version=3.0.0 X-Spam-Level: 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. LP -- ********************************************************************* Luca Pascali luca@barettadeit.com asxcaml-guru@barettadeit.com 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/