This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap 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: [PATCH v4 1/3] systemtap/tapsets.cxx: Fix dwarfless probes on multiple static functions


On Thu, 2015-04-23 at 16:21 +0200, Mark Wielaard wrote:
> On Wed, 2015-04-22 at 20:05 +0530, Hemant Kumar wrote:
> > On 04/22/2015 07:10 PM, Mark Wielaard wrote:
> > > @@ -8242,6 +8242,8 @@ symbol_table::purge_syscall_stubs()
> > >     if (!addrs || addrs->empty())
> > >       return;
> > >     /* Highly unlikely that multiple symbols named "sys_ni_syscall" may exist */
> > > +  if (addrs->size() > 1)
> > > +    cerr << _("Multiple 'sys_ni_syscall' symbols found.");
> > >     Dwarf_Addr stub_addr = addrs->front();
> > >
> > > Just so that if this highly unlikely scenario does occur we get a
> > > warning something is fishy.
> > >
> > Right! looks good.
> 
> And I am glad we did add that warning.
> Martin found it triggered on ppc64be (ELFv1 ABI).

And then Martin found another issue on ppc64be (ELFv1 ABI) when
systemtap was using an older elfutils (< 0.158). Again it was mostly
harmless, but somewhat inefficient. Fixed as follows:

commit f80d9cdb30789aecac4727ae87b22c373900e6ca
Author: Mark Wielaard <mjw@redhat.com>
Date:   Fri Apr 24 19:59:32 2015 +0200

  Filter out descriptor/SHN_UNDEF symbols in
  symbol_table::lookup_symbol.
    
  With newer elfutils (>= 0.158) function descriptor symbols get
  resolved to their actual function entry address. With older elfutils
  we mark such symbols as descriptor through reject_section (because
  their address will match the .opd). Filter these symbols out in
  symbol_table::lookup_symbol and symbol_table::lookup_symbol_address.
  None of the callers want these SHN_UNDEF/descriptor symbol
  (addresses).
    
  This solves another instance of Multiple 'sys_ni_syscall' symbols
  found warning on ppc64[be] with older elfutils.

Cheers,

Mark


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