From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1596 invoked by alias); 11 Apr 2006 15:31:40 -0000 Received: (qmail 1585 invoked by uid 22791); 11 Apr 2006 15:31:39 -0000 X-Spam-Check-By: sourceware.org Received: from smtp18.wanadoo.fr (HELO smtp18.wanadoo.fr) (193.252.22.126) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Apr 2006 15:31:37 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1806.wanadoo.fr (SMTP Server) with ESMTP id EBCC47000160 for ; Tue, 11 Apr 2006 17:31:34 +0200 (CEST) Received: from w98.wanadoo.fr (AMarseille-252-1-29-47.w83-201.abo.wanadoo.fr [83.201.46.47]) by mwinf1806.wanadoo.fr (SMTP Server) with ESMTP id 4C2D570000BB; Tue, 11 Apr 2006 17:31:34 +0200 (CEST) X-ME-UUID: 20060411153134312.4C2D570000BB@mwinf1806.wanadoo.fr Message-Id: <6.1.0.6.0.20060411164403.00a99bd0@pop.wanadoo.fr> X-Sender: jr.peulve@pop.wanadoo.fr X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Wed, 12 Apr 2006 11:38:00 -0000 To: Daniel Jacobowitz From: Jean-Rene Peulve Subject: Re: Wrong address for static function in linux module Cc: gdb@sources.redhat.com In-Reply-To: <20060411144002.GA27443@nevyn.them.org> 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> <20060411133836.GA22167@nevyn.them.org> <6.1.0.6.0.20060411163043.00a957f0@pop.wanadoo.fr> <20060411144002.GA27443@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable 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/msg00140.txt.bz2 Hi Daniel, I was using -g from the standard uClinux tree to build the kernel. I just tried -gdwarf-2 and it seems to work. I got it right with -ggdb as well. Many thanks. By the way I had to fixe Jean-Ren=E9 At 16:40 11/04/06, Daniel Jacobowitz wrote: >On Tue, Apr 11, 2006 at 04:31:32PM +0200, Jean-Rene Peulve wrote: > > Hi Daniel, > > > > At 15:38 11/04/06, Daniel Jacobowitz wrote: > > >On Tue, Apr 11, 2006 at 03:33:32PM +0200, Jean-Rene Peulve wrote: > > >> Relocation section '.rela.stab' at offset 0x2039c contains 41 entrie= s: > > >> 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. > > > > In bfd_perform_relocation for the .stab section I see that at line 633 > > relocation is 0 for the static function horloge_read when it is 0x37a f= or > > the non static function HorlogeCheck. > >That is not a problem. That's just the symbol value, relative to the >start of .text. Look down at line 645, and you'll see the addend >applied. > > > What do you recommend to use rather than stabs ? > >DWARF-2. > >-- >Daniel Jacobowitz >CodeSourcery