[DynInst_API:] image::findMain fails for -pie


Date: Fri, 21 Nov 2014 11:02:26 +0200
From: Adrian M Negreanu <groleo@xxxxxxxxx>
Subject: [DynInst_API:] image::findMain fails for -pie
Hi,


I tried to instrument a strip-ed chrome, as a workaround the
processCreate issue(s) , only to find another problem, this time in image::findMain()

findMain() assumes the entry point address to be an immediate operand:
Âmov  Â$0x40051b,%rdi
Âcallq Â0x7ffff7fef3f0

For chrome, I found this instead
Âlea -0x34f7(%rip),%rdi
Âcallq 26f20 <__libc_start_main@plt>

Josh found the same issue with a strip-ed stap, or as he put it
Â"/usr/bin/stap is PIE, and I removed the debuginfo package"



Any suggestions for this one ?



thanks,
adrian
[← Prev in Thread] Current Thread [Next in Thread→]