From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11023 invoked by alias); 28 Sep 2007 16:29:20 -0000 Received: (qmail 10956 invoked by uid 22791); 28 Sep 2007 16:29:20 -0000 X-Spam-Check-By: sourceware.org Received: from mx.transitive.com (HELO pennyblack.transitives.com) (217.207.128.220) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 28 Sep 2007 16:29:16 +0000 Received: from [192.168.2.164] (helo=[192.168.2.164]) by pennyblack.transitives.com with esmtp (Exim 4.50) id 1IbIfB-0001ue-Dw; Fri, 28 Sep 2007 16:26:02 +0000 Subject: Re: GDB confused by -shared object executable From: Alex Bennee To: Daniel Jacobowitz Cc: gdb@sourceware.org, binutils@sourceware.org In-Reply-To: <20070928160532.GA14380@caradoc.them.org> References: <1190995357.27975.157.camel@murta.transitives.com> <20070928160532.GA14380@caradoc.them.org> Content-Type: text/plain Date: Fri, 28 Sep 2007 16:31:00 -0000 Message-Id: <1190997028.27975.162.camel@murta.transitives.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2007-09/txt/msg00244.txt.bz2 On Fri, 2007-09-28 at 12:05 -0400, Daniel Jacobowitz wrote: > On Fri, Sep 28, 2007 at 05:02:37PM +0100, Alex Bennee wrote: > > Which doesn't seem to work. So questions: > > > > 1. Am I using the correct instantiation to load symbols at a particular > > address? > > 2. Should GDB check the ELF when it loads it to see if it is an > > executable shared object? > > Red Hat (Elena, I think) long ago implemented support for PIE in GDB. > What you're doing is basically the same thing. So far, no one has > gotten around to merging that support to the FSF releases. > > I think it's in both the Red Hat and Ubuntu packages nowadays. I can't speak for RedHat but it doesn't seem to be in my Ubuntu setup: 17:24 alexjb@murta/x86_64 [testcases] >gdb --version GNU gdb 6.6-debian I'll see if I can track down a patch from the RedHat srpms... -- Alex, homepage: http://www.bennee.com/~alex/ The Force is what holds everything together. It has its dark side, and it has its light side. It's sort of like cosmic duct tape.