From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11287 invoked by alias); 15 Jul 2010 13:10:11 -0000 Received: (qmail 11279 invoked by uid 22791); 15 Jul 2010 13:10:11 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-px0-f169.google.com (HELO mail-px0-f169.google.com) (209.85.212.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Jul 2010 13:10:05 +0000 Received: by pxi7 with SMTP id 7so911776pxi.0 for ; Thu, 15 Jul 2010 06:10:04 -0700 (PDT) Received: by 10.114.74.3 with SMTP id w3mr134378waa.3.1279199402391; Thu, 15 Jul 2010 06:10:02 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id d38sm4090893wam.20.2010.07.15.06.09.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Jul 2010 06:10:01 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 34D80170C1EB; Thu, 15 Jul 2010 22:39:55 +0930 (CST) Date: Thu, 15 Jul 2010 13:10:00 -0000 From: Alan Modra To: Andreas Schwab Cc: David Stubbs , binutils@sourceware.org Subject: Re: VMA section overlap warnings for overlays Message-ID: <20100715130955.GH31087@bubble.grove.modra.org> Mail-Followup-To: Andreas Schwab , David Stubbs , binutils@sourceware.org References: <4D60B0700D1DB54A8C0C6E9BE69163700E67DFD1@EXCHANGEVS.IceraSemi.local> <20100421082441.GG3510@bubble.grove.modra.org> <4D60B0700D1DB54A8C0C6E9BE69163700E7815C7@EXCHANGEVS.IceraSemi.local> <20100422011106.GI3510@bubble.grove.modra.org> <20100422015303.GK3510@bubble.grove.modra.org> <4D60B0700D1DB54A8C0C6E9BE69163700E7F2F15@EXCHANGEVS.IceraSemi.local> <20100424021750.GQ3510@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: 2010-07/txt/msg00182.txt.bz2 On Thu, Jul 15, 2010 at 10:11:03AM +0200, Andreas Schwab wrote: > Alan Modra writes: > > > @@ -5837,7 +5853,8 @@ copy_elf_program_header (bfd *ibfd, bfd > > section = section->next) > > { > > this_hdr = &(elf_section_data(section)->this_hdr); > > - if (ELF_IS_SECTION_IN_SEGMENT_FILE (this_hdr, segment)) > > + if (this_hdr->sh_size != 0 > > + && ELF_SECTION_IN_SEGMENT (this_hdr, segment)) > > Why can't an empty section never be part of a segment? Good question. I didn't change anything with that patch. HJ's ELF_IS_SECTION_IN_SEGMENT_FILE included the sh_size check. -- Alan Modra Australia Development Lab, IBM