Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Richard Schmitt <rschmitt@bluepeach.com>
Cc: gdb@sources.redhat.com, rishi75@hotmail.com
Subject: Re: Relocating Static Local Variables BUG?
Date: Fri, 23 Apr 2004 16:51:00 -0000	[thread overview]
Message-ID: <20040423164129.GA12949@nevyn.them.org> (raw)
In-Reply-To: <56026.10.0.1.2.1082738201.squirrel@mail.bluepeach.com>

On Fri, Apr 23, 2004 at 12:36:41PM -0400, Richard Schmitt wrote:
> 
> The version of GCC is 3.3.1
> The version of GDB is 6.1 (downloaded latest release)
> 
> The commands to generate the elf are:
> 
> gcc -o test.exe -g test.c
> objcopy -O elf32-little test.exe test.elf
> 
> Built this way, the code is not relocatable, so there is no output of the
> -r command to readelf.  I've done it this way just to demonstrate the
> issue that gdb has with relocating symbols, which is independent of code
> generated as relocatable.  The -s output is shown below.

Well, it's not surprising that doesn't work.  You are taking
non-relocatable output, and giving GDB offsets at which to relocate it. 
The debug information no longer has relocation information, since final
relocation has already been performed.

I assume that's your simplified testcase rather than the one you were
actually trying to debug, and you've oversimplified it - since f you
needed to have .bss at the offset you told GDB about, then your code
would be referencing it in the wrong place.  How is the original code
for your target built?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


      reply	other threads:[~2004-04-23 16:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23 16:10 Richard Schmitt
2004-04-23 16:37 ` Daniel Jacobowitz
2004-04-23 16:41   ` Richard Schmitt
2004-04-23 16:51     ` Daniel Jacobowitz [this message]

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=20040423164129.GA12949@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb@sources.redhat.com \
    --cc=rishi75@hotmail.com \
    --cc=rschmitt@bluepeach.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