From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8450 invoked by alias); 21 Mar 2014 15:55:00 -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 8432 invoked by uid 89); 21 Mar 2014 15:54:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Mar 2014 15:54:59 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2LFsrFM015006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Mar 2014 11:54:54 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s2LFsp2g009472; Fri, 21 Mar 2014 11:54:51 -0400 Message-ID: <532C60CA.6090008@redhat.com> Date: Fri, 21 Mar 2014 15:55:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: "Metzger, Markus T" , Pedro Alves , Mark Wielaard , Cary Coutant , Doug Evans , "gdb@sourceware.org" , "binutils@sourceware.org" Subject: Re: vdso handling References: <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> <20140313235347.GD3384@bubble.grove.modra.org> <20140318230939.GA9145@bubble.grove.modra.org> <20140320015950.GB13347@bubble.grove.modra.org> In-Reply-To: <20140320015950.GB13347@bubble.grove.modra.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-03/txt/msg00062.txt.bz2 On 03/20/2014 01:59 AM, Alan Modra wrote: > On Wed, Mar 19, 2014 at 08:29:47AM +0000, Metzger, Markus T wrote: >> Shouldn't the ehdr indicate that there are no sections in this case? > > Nope. See my other email to Pedro. > >> If we can't trust the image to contain everything that the ELF header >> describes, would it be safer to generate fake sections based on the >> program header? We already assume that the program header is >> contained in the image. > > Yes, you're correct that it is wrong to assume program headers are > loaded. Even worse, the in-memory image doesn't even need to contain > the ELF file header. Yeah, and I was just assuming it didn't, hence my "just trust the headers" push before. I'm now thinking that we'll need pseudo-sections from program headers anyway, so I'd suggest going in that direction, leaving the add-symbol-file-from-memory command's intention generic, and leave revisiting how gdb retrieves the vdso itself off of memory for another day. -- Pedro Alves