Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Roland Puntaier <Roland.Puntaier@br-automation.com>
Cc: gdb@sources.redhat.com
Subject: Re: relocations when doing file command at gdb prompt
Date: Thu, 08 Mar 2007 16:05:00 -0000	[thread overview]
Message-ID: <20070308160501.GA8042@caradoc.them.org> (raw)
In-Reply-To: <OF6A2120A5.20B606CA-ONC1257298.00556843-C1257298.0056E444@br-automation.com>

On Thu, Mar 08, 2007 at 04:49:06PM +0100, Roland Puntaier wrote:
> > So, are you loading an object file or a linked program? 
> An object file.

Actually, ET_DYN is not quite either.  It's more like a linked program
for the purpose of my question.

> > Does it have relocations included? 
> Yes

>                     [Elf32_Stab]
>                     n_strx:                        0x14      
>                     n_type:                        0x64      
>                     n_other:                       0x0       
>                     n_desc:                        0x2       
>                     n_value:                       0x8048238 

>                     [Elf32_Rel]
>                     r_offset:                      0x14      
>                     r_info:                        0x601      --> ELF32_R_SYM:0x6, ELF32_R_TYPE:0x1(R_386_32)

So, it's relocated already, but the relocations are still present.
No wonder GDB is doubling them.

This code was originally added for shared libraries (ET_DYN).  Those
generated by the GNU binutils at the time had relocations in shared
libraries that had _not_ been applied.

I don't see how we can sensibly distinguish the two cases.  What
toolchain produced this file?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-03-08 16:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-07 16:16 Roland Puntaier
2007-03-08 15:22 ` Daniel Jacobowitz
2007-03-08 15:49   ` Roland Puntaier
2007-03-08 16:05     ` Daniel Jacobowitz [this message]
2007-03-08 17:54       ` Antwort: " Roland Puntaier
2007-03-08 18:26         ` Daniel Jacobowitz
2007-03-08 22:24         ` Daniel Jacobowitz

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=20070308160501.GA8042@caradoc.them.org \
    --to=drow@false.org \
    --cc=Roland.Puntaier@br-automation.com \
    --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