From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13003 invoked by alias); 6 Jun 2006 17:23:53 -0000 Received: (qmail 12991 invoked by uid 22791); 6 Jun 2006 17:23:52 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-vbr12.xs4all.nl (HELO smtp-vbr12.xs4all.nl) (194.109.24.32) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 06 Jun 2006 17:23:50 +0000 Received: from donna2 (brothom.xs4all.nl [80.126.193.216]) by smtp-vbr12.xs4all.nl (8.13.6/8.13.6) with ESMTP id k56H6oi5026143; Tue, 6 Jun 2006 19:06:51 +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 1Fneuv-0003nh-BT; Tue, 06 Jun 2006 19:00:33 +0200 Message-ID: <4485C3FA.30201@brothom.nl> Date: Tue, 06 Jun 2006 17:23:00 -0000 From: Bert Thomas User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Vrabel , ecos-devel@ecos.sourceware.org Subject: Re: bug in RedBoot ELF loader? References: <44857F82.1020302@brothom.nl> <448596BD.30304@arcom.com> In-Reply-To: <448596BD.30304@arcom.com> 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/msg00010.txt.bz2 David Vrabel wrote: > Bert Thomas wrote: > >>Example: >> >>An ELF file with 2 segments: >>segment 0: offset in file = 0, length = 0xac >>segment 1: offset in file = 0xac, length = 15 > > > An ELF with a section having a file offset of 0 looks bogus to me. Why > would you need to load the ELF header into RAM? Example: readelf -a /bin/ls Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align PHDR 0x000034 0x08048034 0x08048034 0x000e0 0x000e0 R E 0x4 INTERP 0x000114 0x08048114 0x08048114 0x00013 0x00013 R 0x1 [Requesting program interpreter: /lib/ld-linux.so.2] LOAD 0x000000 0x08048000 0x08048000 0x0e994 0x0e994 R E 0x1000 LOAD 0x00f000 0x08057000 0x08057000 0x003c0 0x0074c RW 0x1000 DYNAMIC 0x00f188 0x08057188 0x08057188 0x000d0 0x000d0 RW 0x4 NOTE 0x000128 0x08048128 0x08048128 0x00020 0x00020 R 0x4 GNU_EH_FRAME 0x00e968 0x08056968 0x08056968 0x0002c 0x0002c R 0x4 Read: http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html "(it's normal behavior for a program to include its ELF header and program header table in its memory image)" I'd aggree with you however... Bert