From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 447 invoked by alias); 24 May 2011 06:27:49 -0000 Received: (qmail 438 invoked by uid 22791); 24 May 2011 06:27:48 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-pv0-f169.google.com (HELO mail-pv0-f169.google.com) (74.125.83.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 May 2011 06:27:34 +0000 Received: by pvc12 with SMTP id 12so3879093pvc.0 for ; Mon, 23 May 2011 23:27:34 -0700 (PDT) Received: by 10.68.47.196 with SMTP id f4mr2753277pbn.363.1306218454183; Mon, 23 May 2011 23:27:34 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id 3sm4811811pbf.29.2011.05.23.23.27.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 May 2011 23:27:32 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id D2DA416DE443; Tue, 24 May 2011 15:57:25 +0930 (CST) Date: Tue, 24 May 2011 06:27:00 -0000 From: Alan Modra To: DJ Delorie Cc: binutils@sourceware.org Subject: Re: [rx,head,2.21] fix lma/vma swap when reading executables in Message-ID: <20110524062725.GA6445@bubble.grove.modra.org> Mail-Followup-To: DJ Delorie , binutils@sourceware.org References: <201105231950.p4NJohMf008470@greed.delorie.com> <20110524033415.GB25620@bubble.grove.modra.org> <201105240358.p4O3wFRg030556@greed.delorie.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201105240358.p4O3wFRg030556@greed.delorie.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00319.txt.bz2 On Mon, May 23, 2011 at 11:58:15PM -0400, DJ Delorie wrote: > > > On Mon, May 23, 2011 at 03:50:43PM -0400, DJ Delorie wrote: > > > + /* For each PHDR in the object, we must find some section that > > > > Limit to just PT_LOAD phdrs? > > You could, but it shouldn't matter - it only affects the VMA of > segments and the LMA of sections. The segments would only be used by, > for example, SREC outputs, which only use PT_LOAD anyway, and sections > are normally used for their VMA, not LMA. I haven't verified this, > but I think it might compute the correct values anyway - the altered > field is not used in computations on read-in. > > I'll add one if you want, though. It would add symmetry :-) (and > paranoia) I think it might work better.. Other phdrs (with zero p_offset and p_filesz) will match all sections the way you've written the tests. -- Alan Modra Australia Development Lab, IBM