From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26887 invoked by alias); 11 Apr 2006 13:11:47 -0000 Received: (qmail 26877 invoked by uid 22791); 11 Apr 2006 13:11:46 -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:11:45 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FTIek-0005cm-SQ; Tue, 11 Apr 2006 09:11:42 -0400 Date: Tue, 11 Apr 2006 13:38: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: <20060411131142.GA21521@nevyn.them.org> Mail-Followup-To: Jean-Rene Peulve , gdb@sources.redhat.com References: <6.1.0.6.0.20060411102654.00ad0710@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.20060411102654.00ad0710@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/msg00129.txt.bz2 On Tue, Apr 11, 2006 at 11:01:13AM +0200, Jean-Rene Peulve wrote: > Hi, > I am debugging a linux module on a Coldfire and I encounter the following > problem: > -functions which have the static attribut are always relocated at offset 0 > of the .text section with the break command when the display command at > the > right address disassemble the right static function. > -functions without the static attribut are relocated properly. > > I found out that the psymtab entry for a static function is relocated at > the > right offset in the .text section when the symtab entry for the same > function > is relocated at offset 0 of the .text section. > > To generate the target software, I use gcc 2.95.3 > I was using gdb 5.2.1, then I fetch gdb-6.4.50.20060405 and get the same > problem. This is normally supposed to be handled in symfile_relocate_debug_section. Are the bad functions really in ".text", or in another named text section? Does the debug section have proper relocations for that .debug_info entry (readelf -r)? -- Daniel Jacobowitz CodeSourcery