Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/RFC] try ignoring bad PLT entries in ELF symbol tables
Date: Fri, 21 Oct 2011 17:40:00 -0000	[thread overview]
Message-ID: <20111021172958.GH19246@adacore.com> (raw)
In-Reply-To: <20111020194921.GA16613@host1.jankratochvil.net>

> > Normally, such entries either have a null value, or their value
> > corresponds to an address in the PLT section.
> 
> Do you have some such file with undefinde symbol and non-zero value?

Do you mean, other than on ia64-hpux? My comment is just repeating
what the comment in that file says, so I assume it's true somewhere.

> > +	  if (strncmp (sect->name, ".plt", 4) != 0
> > +	      && bfd_get_section_by_name (abfd, ".plt") != NULL)
> 
> At least the bfd_get_section_by_name result should be cached.

I didn't think it was going to make much of a difference, since
this only happens for symbols that point outside of the .plt
section, which I am hoping would be seldom.  But if others agree
with the caching (or even if it does not really matter to them),
it's no problem.

As a datapoint, my executable has 96 undefined symbols for a total
of roughly 1150 symbols in total. Total number of sections is
almost 50 with .plt at index 30. That indeed suggest that we can
get a good improvement in terms of performance, although I don't
think it be noticeable as far as the user is concerned.

I'll wait for an official review before making any adjustment.
Thanks for your comments,
-- 
Joel


  reply	other threads:[~2011-10-21 17:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19  0:30 Joel Brobecker
2011-10-20 20:00 ` Jan Kratochvil
2011-10-21 17:40   ` Joel Brobecker [this message]
2011-10-21 17:56     ` Jan Kratochvil
2011-12-01 23:14 ` Joel Brobecker
2011-12-19  4:59 ` Joel Brobecker

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=20111021172958.GH19246@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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