From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30870 invoked by alias); 21 Aug 2006 15:15:22 -0000 Received: (qmail 30805 invoked by uid 22791); 21 Aug 2006 15:15:21 -0000 X-Spam-Check-By: sourceware.org Received: from e32.co.us.ibm.com (HELO e32.co.us.ibm.com) (32.97.110.150) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Aug 2006 15:15:14 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k7LFF6dV027646; Mon, 21 Aug 2006 11:15:06 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k7LFF3UD040374; Mon, 21 Aug 2006 09:15:03 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k7LFF2kS010942; Mon, 21 Aug 2006 09:15:02 -0600 Received: from vivek.in.ibm.com ([9.124.88.37]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k7LFF1cl010802; Mon, 21 Aug 2006 09:15:02 -0600 Received: by vivek.in.ibm.com (Postfix, from userid 500) id C82B86036C; Mon, 21 Aug 2006 11:14:39 -0400 (EDT) Date: Mon, 21 Aug 2006 15:15:00 -0000 From: Vivek Goyal To: gdb@sourceware.org, Dave Anderson , binutils@sourceware.org Subject: Re: "gdb vmlinux" gives wrong symbol addresses Message-ID: <20060821151439.GF9549@in.ibm.com> Reply-To: vgoyal@in.ibm.com 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.5.11 X-IsSubscribed: yes 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/msg00162.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?). > This brings me to a stupid question. Why do I have to apply relocations for file type ET_EXEC. By definition, doesn't it mean that all the relocations have already been processed? Thanks Vivek