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: Prelinking on ARM with Debug Link


On Wed, 2016-04-06 at 22:44 +0200, Torsten Polle wrote:
> > Am 05.04.2016 um 15:44 schrieb Mark Wielaard <mjw@redhat.com>:
> > runtime/unwind.c (adjustStartLoc):
> > 
> >  if (is_ehframe)
> >    return startLoc + vm_addr;
> >  else
> >    return startLoc + vm_addr - s->sec_load_offset;
> 
> I had twiddled with the else branch in the past. I do not recall all
> attempts. But Iâm sure that I set sec_load_offset even to 0. The
> result is that the probes are set at the wrong address in libc. To be
> more concrete they are offset by -5184 compared to the original
> address. Still Iâll check your patch and let you know the result.

This code is certainly confusing. And arm32 might have different
defaults from all other architectures (which normally have .eh_frames
instead of just .debug_frames, on arm32 unwinding is often done through
EXIDX - exception index tables - instead, but stap doesn't support
those). So it might indeed be that in your case the non-ehframe path is
taken. But I believe that even in that sec_load_offset should be zero.
So it might impact unwinding through user space shared libraries. But it
should not impact setting probe points in shared libraries.

On my own setup (x86_64 native) the patch showed no regressions with
make installcheck. I would be interesting to hear of any test results
you get with my patch.

Thanks,

Mark


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