From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14831 invoked by alias); 15 May 2008 16:59:25 -0000 Received: (qmail 14812 invoked by uid 22791); 15 May 2008 16:59:21 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 May 2008 16:59:02 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 93903983D6; Thu, 15 May 2008 16:59:00 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 72E8A9830E; Thu, 15 May 2008 16:59:00 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JwgnD-0001sC-IQ; Thu, 15 May 2008 12:58:59 -0400 Date: Thu, 15 May 2008 18:22:00 -0000 From: Daniel Jacobowitz To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [rfc] Fix problem with (maybe) non-relocated .opd section on powerpc64-linux Message-ID: <20080515165859.GA6488@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <20080515121922.GD7597@caradoc.them.org> <200805151614.m4FGEo8M004041@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805151614.m4FGEo8M004041@d12av02.megacenter.de.ibm.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-05/txt/msg00470.txt.bz2 On Thu, May 15, 2008 at 06:14:50PM +0200, Ulrich Weigand wrote: > Well, it seems that this field is set to RT_CONSISTENT *before* the > objects are relocated (from elf/dl-open.c): Yuck. I thought it was just before calling _dl_init, but I was clearly wrong. This makes relying on the opd contents from the target unreliable whenever we are not in the midst of a call, I guess. This makes the assumption that all .opd entries are always relocated by the same offset the section itself was relocated. */ Do Linux kernel modules have an opd section? I'd recommend the routine the dwarf reader uses to apply relocations except it would be very inefficient unless we cached the result. > > We went round the choice of where to read memory from several times on > > the previous patch, but I don't know the details. > > OK, thanks. It looks like the main issue was making sure we did read from the target if the target_ops provided said to; the exception being the use of tmp_bfd_target in solib-svr4.c. I don't see a problem with your change other than the offset assumption I mentioned above. -- Daniel Jacobowitz CodeSourcery