Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Ulrich Weigand <uweigand@de.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [rfc] Fix mst_solib_trampoline symbol sections for PLT stubs
Date: Wed, 31 Oct 2007 03:17:00 -0000	[thread overview]
Message-ID: <20071031020856.GA30157@caradoc.them.org> (raw)
In-Reply-To: <200710310136.l9V1adrr000915@d12av02.megacenter.de.ibm.com>

On Wed, Oct 31, 2007 at 02:36:39AM +0100, Ulrich Weigand wrote:
> Hello,
> 
> we're still seeing problems on ppc when stepping over shared library
> function calls, due to the issue previously discussed e.g. in:
> http://sourceware.org/ml/gdb-patches/2006-06/msg00368.html
> 
> Now, at the time the discussion primarily focussed on ways how to
> identify PLT stubs via e.g. code reading or BFD synthetic symbols.

Which are otherwise useful too; I really recommend making a synthetic
symtab.  I thought PowerPC BFD already did... oh, 64-bit only.  Right.

> Now, for undefined symbols, the "value" is generally meaningless.
> However, in this specific case, the linker actually may place a
> significant piece of information into the value field: the address
> of the PLT stub used to call the imported function.
> 
> It is my understanding that this information is generally reliable,
> as it is implemented e.g. to determine the value of a function
> pointer constant refering to that symbol (due to the special ABI
> rule that the "address" of a function imported into the main 
> executable, for function pointer comparison purpuses, is the
> address of the PLT stub in the main executable).

Yes.  But if the address of the function is not taken somewhere in the
executable, then the address of the undefined symbol will generally be
left at zero.  That should be true most of the time.  So while I don't
see anything wrong with your approach here, I'm surprised it fixed the
testsuite failures; why do they have non-zero addresses?  If we're
taking their addresses in all cases, we need some new tests.

The patch itself looks fine.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-10-31  2:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-31  2:09 Ulrich Weigand
2007-10-31  3:17 ` Daniel Jacobowitz [this message]
2007-10-31 17:56   ` Ulrich Weigand
2007-10-31 18:06     ` Daniel Jacobowitz
2007-10-31 20:41       ` Ulrich Weigand

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=20071031020856.GA30157@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.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