Prelinking on ARM with Debug Link

Mark Wielaard mjw@redhat.com
Mon Apr 11 21:02:00 GMT 2016


On Mon, Apr 11, 2016 at 08:47:00PM +0200, Torsten Polle wrote:
> I’ve checked your patch. As a result the backtrace calculations
> break in my environment.

I assume this is an in-kernel backtrace, does it involve kernel modules?
Or is it a user backtrace, executable only? shared libraries?
Could you show a probe script and example backtrace?

Please do include some verbose output. If you can provide the output
of stap -DDEBUG_UNWIND=1 that might be helpful.

> I’ve therefore instrumented adjustStartLoc() as follows:
> 
>   if (is_ehframe) {
>     printk(KERN_ERR "eh: s=%lu, v=%lu, l=%lu\n", startLoc, vm_addr, s->sec_load_offset);
>     return startLoc + vm_addr;
>   }
>   else {
>     printk(KERN_ERR "no eh: s=%lu, v=%lu, l=%lu\n", startLoc, vm_addr, s->sec_load_offset);
>     return startLoc + vm_addr - s->sec_load_offset;
>   }
> 
> As a result I get the following output:
> 
> [ 1215.876537] no eh: s=297684, v=1307279360, l=4294962112
> [ 1215.876542] no eh: s=297532, v=1307279360, l=4294962112
> [ 1215.876546] no eh: s=297568, v=1307279360, l=4294962112
> [ 1215.876551] no eh: s=297612, v=1307279360, l=4294962112
> [ 1215.876555] no eh: s=297612, v=1307279360, l=4294962112
> [ 1215.876560] no eh: s=297612, v=1307279360, l=4294962112
> 
> This means that the non-ehframe path is taken and that sec_load_offset
> is non-zero.

And that calculation wraps around because it is all unsigned.
I admit I don't understand what this calculation represents.

Cheers,

Mark



More information about the Systemtap mailing list