public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jan.kratochvil@redhat.com
Cc: amodra@bigpond.net.au, vgoyal@in.ibm.com, gdb@sourceware.org,
	        anderson@redhat.com, binutils@sourceware.org
Subject: Re: "gdb vmlinux" gives wrong symbol addresses
Date: Thu, 24 Aug 2006 03:29:00 -0000	[thread overview]
Message-ID: <200608231830.k7NIUv0G022403@elgar.sibelius.xs4all.nl> (raw)
In-Reply-To: <20060823173100.GA1865@host0.dyn.jankratochvil.net> (message from 	Jan Kratochvil on Wed, 23 Aug 2006 19:31:00 +0200)

> Date: Wed, 23 Aug 2006 19:31:00 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> 
> On Mon, 21 Aug 2006 05:24:19 +0200, Alan Modra wrote:
> > On Sun, Aug 20, 2006 at 09:54:30PM -0400, Daniel Jacobowitz wrote:
> > > On Mon, Aug 21, 2006 at 11:08:29AM +0930, Alan Modra wrote:
> > > > I think that for ET_EXEC and ET_DYN gdb should ignore relocs that use
> > > > the normal symbol table.  Sane ELF targets will have dynamic reloc
> > > > section(s) with sh_link pointing at a symtab section with sh_type of
> > > > SHT_DYNSYM.  --emit-relocs creates reloc sections with sh_link pointing
> > > > at a symtab section with sh_type of SHT_SYMTAB.
> > > 
> > > This amounts to always ignoring relocations; GDB only uses relocations
> > > for debug sections, which will never point at SHT_DYNSYM (I don't
> > > think?).
> > 
> > When we emitted relocs for debug sections on some targets (eg. ppc32
> > prior to 2005-04-19), they were against SHT_DYNSYM symbols.
> 
> Do you have such (ppc32?) shared library(?) binary handy?
> It would be find to include it to the gdb testsuite.
> 
> The restricted patch targetting relocatable Linux kernel but not
> targetting the libraries attached, IMO safe.  It is gdb-only patch,
> not binutils-wide.

Are we sure this is safe?  Is it really impossible for debug sections
to refer to symbols in shared libs which will have relocations that
still need to be processed?

Mark

  reply	other threads:[~2006-08-23 18:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060818183807.GD12962@in.ibm.com>
2006-08-18 22:09 ` Daniel Jacobowitz
2006-08-19 12:09   ` Vivek Goyal
2006-08-21  3:24   ` Alan Modra
2006-08-21  7:19     ` Daniel Jacobowitz
2006-08-21  8:13       ` Alan Modra
2006-08-23 18:31         ` Jan Kratochvil
2006-08-24  3:29           ` Mark Kettenis [this message]
2006-08-24  3:51             ` Daniel Jacobowitz
2006-08-21 15:27       ` Vivek Goyal
2006-08-21 17:56         ` 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=200608231830.k7NIUv0G022403@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=amodra@bigpond.net.au \
    --cc=anderson@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=gdb@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=vgoyal@in.ibm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).