From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29218 invoked by alias); 7 Jun 2006 08:39:59 -0000 Received: (qmail 29201 invoked by uid 22791); 7 Jun 2006 08:39:57 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-vbr13.xs4all.nl (HELO smtp-vbr13.xs4all.nl) (194.109.24.33) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 07 Jun 2006 08:39:40 +0000 Received: from donna2 (brothom.xs4all.nl [80.126.193.216]) by smtp-vbr13.xs4all.nl (8.13.6/8.13.6) with ESMTP id k578dSfS000527; Wed, 7 Jun 2006 10:39:37 +0200 (CEST) (envelope-from bert@brothom.nl) Received: from [192.168.0.194] (helo=[192.168.0.194]) by donna2 with esmtp (Exim 4.34) id 1FntTS-0004lb-QQ; Wed, 07 Jun 2006 10:33:10 +0200 Message-ID: <44869E8E.7070407@brothom.nl> Date: Wed, 07 Jun 2006 08:39:00 -0000 From: Bert Thomas User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gary Thomas CC: eCos development Subject: Re: bug in RedBoot ELF loader? References: <44857F82.1020302@brothom.nl> <448596BD.30304@arcom.com> <4485C3FA.30201@brothom.nl> <1149615229.15359.41.camel@hermes> <4485EE86.9040909@brothom.nl> <1149624902.15359.55.camel@hermes> <4485F487.6080000@brothom.nl> <1149626938.15359.62.camel@hermes> In-Reply-To: <1149626938.15359.62.camel@hermes> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BroThom-MailScanner: Found to be clean X-BroThom-MailScanner-From: bert@brothom.nl X-Virus-Scanned: by XS4ALL Virus Scanner X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2006-06/txt/msg00013.txt.bz2 > Of course - the headers are just that; descriptions of stuff to come > _later_ in the file. A sane ELF file (files created by GNU ld behave > this way) will have the various section headers first, followed by > the actual program segments. There is no need for a loader (like > RedBoot which is what started this discussion) to ever load the > headers as part of the image, rather only process them to figure > out what needs to be loaded and where. For example, a RAM program I aggree with you on the sanity part. However, I bet that most if not all Linux executables have a segment that include the headers. I assume you are working on a Linux machine. Could you try readelf on ls for example? Again, it is not that I disaggree with you. It is just that I observe it isn't the way you and I expected it to be. I suspect the reason that your example doesn't have a segment that includes the headers has something to do with the linker script you wrote to link that program. Bert