From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19252 invoked by alias); 9 Jun 2007 02:08:33 -0000 Received: (qmail 19243 invoked by uid 22791); 9 Jun 2007 02:08:32 -0000 X-Spam-Check-By: sourceware.org Received: from nz-out-0506.google.com (HELO nz-out-0506.google.com) (64.233.162.235) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 09 Jun 2007 02:08:30 +0000 Received: by nz-out-0506.google.com with SMTP id q3so135805nzb for ; Fri, 08 Jun 2007 19:08:29 -0700 (PDT) Received: by 10.143.43.20 with SMTP id v20mr178458wfj.1181354908644; Fri, 08 Jun 2007 19:08:28 -0700 (PDT) Received: by 10.142.104.4 with HTTP; Fri, 8 Jun 2007 19:08:28 -0700 (PDT) Message-ID: Date: Mon, 11 Jun 2007 20:35:00 -0000 From: "Christopher Cordahi" To: "Sergei Gavrikov" Cc: ecos-discuss@ecos.sourceware.org In-Reply-To: <20070605182958.GA8564@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070605182958.GA8564@ubuntu> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Adding checksum to elf file X-SW-Source: 2007-06/txt/msg00101.txt.bz2 On 05/06/07, Sergei Gavrikov wrote: > On Tue, Jun 05, 2007 at 01:49:36PM -0400, Christopher Cordahi wrote: > > Hello ecos > > > > I'd like to add some sort of checksum into the .elf files. > > Is there a standard way of doing this? > > > > Googling I see some mention of a .dynamic tag DT_CHECKSUM > > but not how to use it properly > > and a short discussion in > > http://ecos.sourceware.org/ml/binutils/2003-02/msg00242.html > > but it doesn't seem very standard. > > > > Any ideas? > > It seems, it's more suitable to verify ELF using a parallel md5sum file > That is 128-bit! There are sources http://www.ietf.org/rfc/rfc1321.txt. Thanks, However I only want it to detect accidental file corruption, something that can be added to the file at file creation and can be easily verified by the program loader (redboot). At most I was thinking about implementing a 32 bit CRC algorithm and probably only a 16 bits. Maintaining and distributing only 1 file is much easier than 2 so I am hoping to add the CRC to the file in a standard way. If there is no such standard I'll have to resort to a method similar to that mentioned in the discussion. -- Chris -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss