From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22696 invoked by alias); 23 Aug 2006 18:31:32 -0000 Received: (qmail 22680 invoked by uid 22791); 23 Aug 2006 18:31:32 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 23 Aug 2006 18:31:27 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k7NIUxTf011138; Wed, 23 Aug 2006 20:30:59 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6) with ESMTP id k7NIUxg8010459; Wed, 23 Aug 2006 20:30:59 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.6/8.13.6/Submit) id k7NIUv0G022403; Wed, 23 Aug 2006 20:30:57 +0200 (CEST) Date: Wed, 23 Aug 2006 18:31:00 -0000 Message-Id: <200608231830.k7NIUv0G022403@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: jan.kratochvil@redhat.com CC: amodra@bigpond.net.au, vgoyal@in.ibm.com, gdb@sourceware.org, anderson@redhat.com, binutils@sourceware.org In-reply-to: <20060823173100.GA1865@host0.dyn.jankratochvil.net> (message from Jan Kratochvil on Wed, 23 Aug 2006 19:31:00 +0200) Subject: Re: "gdb vmlinux" gives wrong symbol addresses References: <20060818183807.GD12962@in.ibm.com> <20060818184837.GA1980@nevyn.them.org> <20060821013829.GA20576@bubble.grove.modra.org> <20060821015430.GA4615@nevyn.them.org> <20060821032419.GB20875@bubble.grove.modra.org> <20060823173100.GA1865@host0.dyn.jankratochvil.net> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00183.txt.bz2 > Date: Wed, 23 Aug 2006 19:31:00 +0200 > From: Jan Kratochvil > > On Mon, 21 Aug 2006 05:24:19 +0200, Alan Modra wrote: > > On Sun, Aug 20, 2006 at 09:54:30PM -0400, Daniel Jacobowitz wrote: > > > On Mon, Aug 21, 2006 at 11:08:29AM +0930, Alan Modra wrote: > > > > I think that for ET_EXEC and ET_DYN gdb should ignore relocs that use > > > > the normal symbol table. Sane ELF targets will have dynamic reloc > > > > section(s) with sh_link pointing at a symtab section with sh_type of > > > > SHT_DYNSYM. --emit-relocs creates reloc sections with sh_link pointing > > > > at a symtab section with sh_type of SHT_SYMTAB. > > > > > > This amounts to always ignoring relocations; GDB only uses relocations > > > for debug sections, which will never point at SHT_DYNSYM (I don't > > > think?). > > > > When we emitted relocs for debug sections on some targets (eg. ppc32 > > prior to 2005-04-19), they were against SHT_DYNSYM symbols. > > Do you have such (ppc32?) shared library(?) binary handy? > It would be find to include it to the gdb testsuite. > > The restricted patch targetting relocatable Linux kernel but not > targetting the libraries attached, IMO safe. It is gdb-only patch, > not binutils-wide. Are we sure this is safe? Is it really impossible for debug sections to refer to symbols in shared libs which will have relocations that still need to be processed? Mark