Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jean-Rene Peulve <jr.peulve@wanadoo.fr>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sources.redhat.com
Subject: Re: Wrong address for static function in linux module
Date: Wed, 12 Apr 2006 11:38:00 -0000	[thread overview]
Message-ID: <6.1.0.6.0.20060411164403.00a99bd0@pop.wanadoo.fr> (raw)
In-Reply-To: <20060411144002.GA27443@nevyn.them.org>

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é
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 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.
> >
> > 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 for
> > 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



  reply	other threads:[~2006-04-11 15:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-11 13:33 Jean-Rene Peulve
2006-04-11 13:38 ` Daniel Jacobowitz
2006-04-11 13:45   ` Jean-Rene Peulve
2006-04-11 13:55     ` Daniel Jacobowitz
2006-04-11 14:41       ` Jean-Rene Peulve
2006-04-11 15:05         ` Daniel Jacobowitz
2006-04-12 11:38           ` Jean-Rene Peulve [this message]
2006-04-12 16:36           ` stabs vs dwarf (was: Re: Wrong address for static function in linux module ) David Taylor
2006-04-13  7:02             ` Mark Kettenis
2006-04-13  8:26               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6.1.0.6.0.20060411164403.00a99bd0@pop.wanadoo.fr \
    --to=jr.peulve@wanadoo.fr \
    --cc=drow@false.org \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox