From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18614 invoked by alias); 21 Aug 2006 03:24:31 -0000 Received: (qmail 18595 invoked by uid 22791); 21 Aug 2006 03:24:29 -0000 X-Spam-Check-By: sourceware.org Received: from omta02sl.mx.bigpond.com (HELO omta02sl.mx.bigpond.com) (144.140.93.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Aug 2006 03:24:27 +0000 Received: from grove.modra.org ([60.226.255.233]) by omta02sl.mx.bigpond.com with ESMTP id <20060821032420.PNTS16864.omta02sl.mx.bigpond.com@grove.modra.org>; Mon, 21 Aug 2006 03:24:20 +0000 Received: by bubble.grove.modra.org (Postfix, from userid 500) id E53181ECDAE; Mon, 21 Aug 2006 12:54:19 +0930 (CST) Date: Mon, 21 Aug 2006 08:13:00 -0000 From: Alan Modra To: Vivek Goyal , gdb@sourceware.org, Dave Anderson , binutils@sourceware.org Subject: Re: "gdb vmlinux" gives wrong symbol addresses Message-ID: <20060821032419.GB20875@bubble.grove.modra.org> Mail-Followup-To: Vivek Goyal , gdb@sourceware.org, Dave Anderson , binutils@sourceware.org References: <20060818183807.GD12962@in.ibm.com> <20060818184837.GA1980@nevyn.them.org> <20060821013829.GA20576@bubble.grove.modra.org> <20060821015430.GA4615@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060821015430.GA4615@nevyn.them.org> User-Agent: Mutt/1.4i X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00217.txt.bz2 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. -- Alan Modra IBM OzLabs - Linux Technology Centre