From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13079 invoked by alias); 16 Jul 2010 10:04:48 -0000 Received: (qmail 13069 invoked by uid 22791); 16 Jul 2010 10:04:47 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_BJ,TW_JC 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; Fri, 16 Jul 2010 10:04:29 +0000 Received: by pxi7 with SMTP id 7so1899071pxi.0 for ; Fri, 16 Jul 2010 03:04:28 -0700 (PDT) Received: by 10.142.211.6 with SMTP id j6mr1094854wfg.34.1279272998706; Fri, 16 Jul 2010 02:36:38 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id y16sm2406715wff.2.2010.07.16.02.36.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Jul 2010 02:36:36 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id CE0E2170C1EB; Fri, 16 Jul 2010 19:06:30 +0930 (CST) Date: Fri, 16 Jul 2010 10:04:00 -0000 From: Alan Modra To: Andreas Schwab Cc: "H.J. Lu" , David Stubbs , binutils@sourceware.org Subject: Re: VMA section overlap warnings for overlays Message-ID: <20100716093630.GN31087@bubble.grove.modra.org> Mail-Followup-To: Andreas Schwab , "H.J. Lu" , David Stubbs , binutils@sourceware.org References: <20100424021750.GQ3510@bubble.grove.modra.org> <20100715130955.GH31087@bubble.grove.modra.org> <20100715141753.GI31087@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/msg00207.txt.bz2 On Fri, Jul 16, 2010 at 09:39:16AM +0200, Andreas Schwab wrote: > "H.J. Lu" writes: > > > Why does an empty section affect section layout? > > ??? That's the bug. I think we could probably remove all the sh_size != 0 tests associated with ELF_SECTION_IN_SEGMENT in elf.c. I'm not sure why they were there in the first place, possibly to cover bugs in the precursors to ELF_SECTION_IN_SEGMENT. If we do that, then any zero size load/alloc sections will be added to a segment map by copy_elf_program_header for objcopy and strip, just as they are for ld. Then the zero size sections will be handled by assign_file_positions_for_load_sections and placed with other load sections, rather than being shunted off to assign_file_positions_for_non_load_sections. -- Alan Modra Australia Development Lab, IBM