From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31770 invoked by alias); 24 Feb 2011 23:49:34 -0000 Received: (qmail 31759 invoked by uid 22791); 24 Feb 2011 23:49:34 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f169.google.com (HELO mail-qy0-f169.google.com) (209.85.216.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Feb 2011 23:49:27 +0000 Received: by qyk2 with SMTP id 2so5439602qyk.0 for ; Thu, 24 Feb 2011 15:49:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.54.6 with SMTP id o6mr1501601qag.49.1298591365692; Thu, 24 Feb 2011 15:49:25 -0800 (PST) Received: by 10.224.61.18 with HTTP; Thu, 24 Feb 2011 15:49:25 -0800 (PST) In-Reply-To: <20100720141031.GI19525@bubble.grove.modra.org> References: <20100715141753.GI31087@bubble.grove.modra.org> <20100716093630.GN31087@bubble.grove.modra.org> <20100720054451.GF19525@bubble.grove.modra.org> <20100720141031.GI19525@bubble.grove.modra.org> Date: Thu, 24 Feb 2011 23:49:00 -0000 Message-ID: Subject: Re: VMA section overlap warnings for overlays From: "H.J. Lu" To: Andreas Schwab , "H.J. Lu" , David Stubbs , binutils@sourceware.org Cc: Alan Modra Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-02/txt/msg00294.txt.bz2 On Tue, Jul 20, 2010 at 7:10 AM, Alan Modra wrote: > This removes all the special treatment for zero size sections when > using ELF_SECTION_IN_SEGMENT in elf.c, and makes readelf display > section to segment mapping for zero size sections. =A0I chose to not > include a zero size section in readelf's mapping if the section was at > the end of a segment. =A0eg. if the segment covers 0x1000 to 0x1fff, > then a zero sized section located at 0x2000 is not shown as part of > the segment. =A0That seems reasonable to me, but I'm open to > suggestions. =A0I'll note that omitting sections like this in elf.c, ie. > using ELF_SECTION_IN_SEGMENT_STRICT there, causes testsuite failures > on x86. =A0A zero length .got.plt sometimes ends up as the last section > mapped to a load segment. > > include/elf/ > =A0 =A0 =A0 =A0* internal.h (ELF_TBSS_SPECIAL): New macro, extracted from= .. > =A0 =A0 =A0 =A0(ELF_SECTION_SIZE): ..here. > =A0 =A0 =A0 =A0(ELF_SECTION_IN_SEGMENT_1): Add "strict" arg. > =A0 =A0 =A0 =A0(ELF_SECTION_IN_SEGMENT_STRICT): New macro. > bfd/ > =A0 =A0 =A0 =A0* elf.c (assign_file_positions_for_load_sections): Check t= hat > =A0 =A0 =A0 =A0zero size sections are allocated in segments too. > =A0 =A0 =A0 =A0(assign_file_positions_for_non_load_sections): Warn if zero > =A0 =A0 =A0 =A0size alloc sections are found here. > =A0 =A0 =A0 =A0(copy_elf_program_header): Don't drop zero size sections f= rom > =A0 =A0 =A0 =A0segment map. > =A0 =A0 =A0 =A0(copy_private_bfd_data): Check for changes in zero size se= ctions. > binutils/ > =A0 =A0 =A0 =A0* readelf.c (process_program_headers): Don't ignore all ze= ro size > =A0 =A0 =A0 =A0sections. > ld/testsuite/ > =A0 =A0 =A0 =A0* ld-powerpc/tlsexe.r: Update. > =A0 =A0 =A0 =A0* ld-powerpc/tlsexetoc.r: Update. > =A0 =A0 =A0 =A0* ld-powerpc/tlsso.r: Update. > =A0 =A0 =A0 =A0* ld-powerpc/tlstocso.r: Update. > This may have caused: http://sourceware.org/bugzilla/show_bug.cgi?id=3D12516 --=20 H.J.