From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5216 invoked by alias); 11 Apr 2006 13:38:40 -0000 Received: (qmail 5208 invoked by uid 22791); 11 Apr 2006 13:38:40 -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; Tue, 11 Apr 2006 13:38:39 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FTJ4m-0005nV-Kd; Tue, 11 Apr 2006 09:38:36 -0400 Date: Tue, 11 Apr 2006 13:55:00 -0000 From: Daniel Jacobowitz To: Jean-Rene Peulve Cc: gdb@sources.redhat.com Subject: Re: Wrong address for static function in linux module Message-ID: <20060411133836.GA22167@nevyn.them.org> Mail-Followup-To: Jean-Rene Peulve , gdb@sources.redhat.com References: <6.1.0.6.0.20060411102654.00ad0710@pop.wanadoo.fr> <20060411131142.GA21521@nevyn.them.org> <6.1.0.6.0.20060411152707.00acc440@pop.wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6.1.0.6.0.20060411152707.00acc440@pop.wanadoo.fr> User-Agent: Mutt/1.5.8i 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-04/txt/msg00131.txt.bz2 On Tue, Apr 11, 2006 at 03:33:32PM +0200, Jean-Rene Peulve wrote: > Relocation section '.rela.stab' at offset 0x2039c contains 41 entries: > Offset Info Type Sym.Value Sym. Name + Addend ... > 000032e4 00000201 R_68K_32 00000000 .text + 136 > Output of m68k-elf-readelf -s horloge.o: > Symbol table '.symtab' contains 47 entries: > .. > 12: 00000136 62 FUNC LOCAL DEFAULT 1 horloge_read There's your relocation of debug info. It is entirely likely that the problem only happens because you're using stabs. It's supposed to work, but I've never tried it. Try taking a look at the contents of the .stab section at that offset (0x32e4) in the file. Then breakpoint after the call to symfile_relocate_debug_section in elfstab_build_psymtabs, and see what's at offset 0x32e4 now. It should be a bit relocated. -- Daniel Jacobowitz CodeSourcery