From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24037 invoked by alias); 16 May 2008 20:35:39 -0000 Received: (qmail 24028 invoked by uid 22791); 16 May 2008 20:35:39 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate3.de.ibm.com (HELO mtagate3.de.ibm.com) (195.212.29.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 May 2008 20:35:17 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.8/8.13.8) with ESMTP id m4GKZFwg095098 for ; Fri, 16 May 2008 20:35:15 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m4GKZEmw934114 for ; Fri, 16 May 2008 22:35:14 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m4GKZEkF025584 for ; Fri, 16 May 2008 22:35:14 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id m4GKZE6E025581; Fri, 16 May 2008 22:35:14 +0200 Message-Id: <200805162035.m4GKZE6E025581@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 16 May 2008 22:35:14 +0200 Subject: Re: [rfc] Fix problem with (maybe) non-relocated .opd section on powerpc64-linux To: drow@false.org (Daniel Jacobowitz) Date: Sat, 17 May 2008 13:22:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <20080515182133.GA12681@caradoc.them.org> from "Daniel Jacobowitz" at May 15, 2008 02:21:33 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00521.txt.bz2 Daniel Jacobowitz wrote: > 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. Thinking about this, it seems this would mean that function descriptors cannot work in kernel modules even today: add-symbol-file solely adds an objfile (with obj_sections and so on); it does not modify the target and its section table. Right? However, ppc64_linux_convert_from_func_ptr_addr *by design* only consults the section table of the target -- this means it will never see those extra symbol files anyway. Am I missing something here? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com