From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8305 invoked by alias); 13 Mar 2014 23:53:57 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 8285 invoked by uid 89); 13 Mar 2014 23:53:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pd0-f170.google.com Received: from mail-pd0-f170.google.com (HELO mail-pd0-f170.google.com) (209.85.192.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 13 Mar 2014 23:53:56 +0000 Received: by mail-pd0-f170.google.com with SMTP id v10so1756686pde.15 for ; Thu, 13 Mar 2014 16:53:54 -0700 (PDT) X-Received: by 10.66.145.230 with SMTP id sx6mr5534809pab.47.1394754834212; Thu, 13 Mar 2014 16:53:54 -0700 (PDT) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPSA id e6sm10676011pbg.4.2014.03.13.16.53.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Mar 2014 16:53:53 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id AE78CEA00D2; Fri, 14 Mar 2014 10:23:47 +1030 (CST) Date: Thu, 13 Mar 2014 23:53:00 -0000 From: Alan Modra To: Pedro Alves Cc: Mark Wielaard , Cary Coutant , Doug Evans , "Metzger, Markus T" , "gdb@sourceware.org" , "binutils@sourceware.org" Subject: Re: vdso handling Message-ID: <20140313235347.GD3384@bubble.grove.modra.org> Mail-Followup-To: Pedro Alves , Mark Wielaard , Cary Coutant , Doug Evans , "Metzger, Markus T" , "gdb@sourceware.org" , "binutils@sourceware.org" References: <20140312071701.GW26922@bubble.grove.modra.org> <20140313010147.GZ26922@bubble.grove.modra.org> <1394704336.11818.115.camel@bordewijk.wildebeest.org> <20140313130322.GA3384@bubble.grove.modra.org> <5321C7C8.6000707@redhat.com> <5321C8FA.40708@gmail.com> <5321CE1A.20509@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5321CE1A.20509@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-03/txt/msg00039.txt.bz2 On Thu, Mar 13, 2014 at 03:26:18PM +0000, Pedro Alves wrote: > So it seems like the whole vdso should be always mapped in. OK, so I think Markus should be looking at why bfd_from_remote_memory decides to exclude the section headers. ie. why the following code is being executed /* If the segments visible in memory didn't include the section headers, then clear them from the file header. */ if ((bfd_vma) contents_size < (i_ehdr.e_shoff + i_ehdr.e_shnum * i_ehdr.e_shentsize)) { memset (&x_ehdr.e_shoff, 0, sizeof x_ehdr.e_shoff); memset (&x_ehdr.e_shnum, 0, sizeof x_ehdr.e_shnum); memset (&x_ehdr.e_shstrndx, 0, sizeof x_ehdr.e_shstrndx); } It may be that we can tweak the heuristic. One thing I noticed is that the following /* Trim the last segment so we don't bother with zeros in the last page that are off the end of the file. However, if the extra bit in that page includes the section headers, keep them. */ will trim off .symtab which might otherwise be available. GNU ld places .symtab after the section headers. -- Alan Modra Australia Development Lab, IBM