From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11383 invoked by alias); 15 May 2008 18:22:04 -0000 Received: (qmail 11204 invoked by uid 22791); 15 May 2008 18:21:57 -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 18:21:37 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id F152E983D6; Thu, 15 May 2008 18:21:34 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id CA1E79830E; Thu, 15 May 2008 18:21:34 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1Jwi57-0003LU-KK; Thu, 15 May 2008 14:21:33 -0400 Date: Thu, 15 May 2008 19:21: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: <20080515182133.GA12681@caradoc.them.org> Mail-Followup-To: Ulrich Weigand , gdb-patches@sourceware.org References: <20080515165859.GA6488@caradoc.them.org> <200805151736.m4FHaXs3007939@d12av02.megacenter.de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805151736.m4FHaXs3007939@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/msg00477.txt.bz2 On Thu, May 15, 2008 at 07:36:33PM +0200, Ulrich Weigand wrote: > Kernel modules generally have an opd section; as in other object files, > these will carry a R_PPC64_ADDR64 relocation pointing to .text + some > offset. (In shared libraries we see a R_PPC_RELATIVE instead.) > > That means my heuristics will probably go wrong when applied to an > object file (or kernel module). When would that actually happen? Generally, they are loaded with either add-symbol-file (by hand or autogenerated) specifying each section. The KGDB guys also have a GDB patch to do it automatically. That's one of my targetted applications of Python scripting. > Should we be using the ppc-linux-tdep.c gdbarch for that? It's a toss-up. I think yes; either that, or the function descriptor code has to move somewhere else that it would still be used, since it still applies. > I guess we could cache the result of symfile_relocate_debug_section > on the .opd section for the objfile. One minor issue would be that > this function currently refuses to operate on non-SEC_DEBUGGING > sections -- is there a reason for that? Not that I can remember. > As I understand symfile_relocate_debug_section, this would still *not* > take the load address of a shared library into account, so that part > would still need to be applied manually, right? I believe so - ANOFFSET? -- Daniel Jacobowitz CodeSourcery