From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6026 invoked by alias); 15 Oct 2006 01:29:56 -0000 Received: (qmail 6012 invoked by uid 22791); 15 Oct 2006 01:29:56 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Sun, 15 Oct 2006 01:29:52 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GYup3-0007d0-TG; Sat, 14 Oct 2006 21:29:49 -0400 Date: Sun, 15 Oct 2006 01:29:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil , jakub@redhat.com Cc: gdb-patches@sourceware.org Subject: Re: Improve separate debug file support for elfutils Message-ID: <20061015012949.GA28974@nevyn.them.org> Mail-Followup-To: Jan Kratochvil , jakub@redhat.com, gdb-patches@sourceware.org References: <20061006202550.GA16735@nevyn.them.org> <20061014234541.GA14820@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061014234541.GA14820@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00165.txt.bz2 On Sun, Oct 15, 2006 at 01:45:41AM +0200, Jan Kratochvil wrote: > Hi Daniel, > > thanks for this patch. Unfortunately using CVS + this patch the problem is > still present: > Reading symbols from /lib/modules/2.6.18-1.2747.fc6/kernel/fs/ext3/ext3.ko...Reading symbols from /usr/lib/debug/lib/modules/2.6.18-1.2747.fc6/kernel/fs/ext3/ext3.ko.debug...DW_FORM_strp pointing outside of .debug_str section [in module /usr/lib/debug/lib/modules/2.6.18-1.2747.fc6/kernel/fs/ext3/ext3.ko.debug] > > These two testfiles stored at: > http://www.jankratochvil.net/priv/ext3-debug.tar.gz > > According to the error I believe the patch also needs to cover libbfd. > Is it valid it still needs to be patched for this case? > > Jakub Jelinek was confirming before that elfutils produce in some way valid > ELFs - with the missing strtab/symtab. I did not check the binaries myself. I didn't even know it was possible to put a .gnu_debuglink in a relocatable file! So this is a different problem than the one I was working on, I suppose. I presume from the error message that bfd_simple_get_relocated_section_contents hasn't relocated the file's debug info. You'll see that it takes a symbol_table. You could probably arrange to supply one from the alternate file. I'm worried that the section offsets would not match up, though, because section numbering changes. Simply put, I do not understand how Jakub can describe this file as valid. The ext3.ko.debug has relocation sections with an sh_link pointing to the NOBITS symtab. And that symtab isn't in that file, and at least one section has a different section index between the two files, so I don't see how you can trust that a symtab from another file is useful in this one. You get lucky, in that only .module_sig moved and there's only one symbol in it (symbol #321), and there's no relocations against the debug sections. Jakub, how do you expect this weird file to be interpreted (and why are you producing things that BFD can't handle, anyway?) -- Daniel Jacobowitz CodeSourcery