This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/RFC] try ignoring bad PLT entries in ELF symbol tables


> > 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]