From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23613 invoked by alias); 21 Apr 2008 18:26:24 -0000 Received: (qmail 23604 invoked by uid 22791); 21 Apr 2008 18:26:22 -0000 X-Spam-Check-By: sourceware.org Received: from wr-out-0506.google.com (HELO wr-out-0506.google.com) (64.233.184.237) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 21 Apr 2008 18:26:06 +0000 Received: by wr-out-0506.google.com with SMTP id 67so1075302wri.3 for ; Mon, 21 Apr 2008 11:26:04 -0700 (PDT) Received: by 10.141.180.11 with SMTP id h11mr3499616rvp.158.1208802363440; Mon, 21 Apr 2008 11:26:03 -0700 (PDT) Received: by 10.141.74.3 with HTTP; Mon, 21 Apr 2008 11:26:03 -0700 (PDT) Message-ID: Date: Mon, 21 Apr 2008 23:26:00 -0000 From: "Ananth Sowda" To: "Ananth Sowda" , gdb@sourceware.org Subject: Re: DSO with relocations and GDB. In-Reply-To: <20080419035335.GA22346@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080419035335.GA22346@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00187.txt.bz2 On 4/18/08, Daniel Jacobowitz wrote: > On Fri, Apr 18, 2008 at 03:50:00PM -0700, Ananth Sowda wrote: > > The powerpc eabi DSO (dynamic shared object) I'm debugging using GDB > > 6.6 has .debug_info and other debug tables which have unresolved > > relocations. The .rela_debug_info is available in the DSO and it has > > sh_link set to .symtab, sh_info to .debug_info. However, the bfd code > > in GDB 6.6 does not seem to associate the .debug_info with > > corresponding .rela_debug.info section. When GDB attempts to relocate > > these debug tables, bfd does not recognize that the section has > > relocations. > > What does objdump -h say about this file? IOW, what do you mean by > "does not seem to associate"? BFD internal section data structure for .debug_info section is not marked with SEC_RELOC in flags and number of relocation records for the section is 0. objdump -h output shows that sh_link(points to .symtab) and sh_link(points to .debug_info) are set correctly for the .rela_debug.info section. > > GDB is supposed to handle this case correctly. However, we've also > pretty well established that the linker is wrong to emit such > relocations; if you have the option of using a different linker > version which does not do so, I recommend it. I agree using a linker which resolves the relocations fixes the problem. -Thanks