| Date: | Tue, 29 Dec 2015 18:29:46 +0100 |
|---|---|
| From: | Aleksandar Nikolich <anikolich@xxxxxxxxxxxxxx> |
| Subject: | [DynInst_API:] Instrumenting/rewriting position independent binaries |
|
Hi list,
I've been in the process of updating my code to work with new releases of Dyninst and noticed one problem in a specific test. Namely, when trying to rewrite binaries compiled as position independent (for example with gcc -fPIC -pie) the rewritten binary seems to have some sections broken and crashes while starting up. It crashes during load time, doesn't even reach point of execution. I've attached a minimal test that reproduces the issue. After compiling, running the "test_instrumentation" just rewrites the binary to the disk as "test_ins". Trying to run "test_ins" crashes during dl_main in ld.so. Curious thing is that if the binary is run with ld.so (like so: /lib64/ld-linux.so ./test_ins) it executes without problems. This leads me to believe that the problem is in some of the rewritten sections. Instrumenting PIE binaries does/did work in previous version (at least 8.2 as I was using it as stable release) but I was unable to pinpoint where it stopped working. So far, I've tested this with 9.0.3 , 9.1 as well as with the latest git tree on Fedora 23/22 x64 and x86. Before I start digging into it, any obvious reasons why this would be happening? Cheers, Aleks Attachment:
tests.tgz |
| [← Prev in Thread] | Current Thread | [Next in Thread→] |
|---|---|---|
| ||
| Previous by Date: | [DynInst_API:] Compiling dyninst-9.1.0 on aarch64, William Cohen |
|---|---|
| Next by Date: | , (nil) |
| Previous by Thread: | Re: [DynInst_API:] InstructionAPI segfault on archive files, Alin MÃndroc |
| Next by Thread: | [DynInst_API:] issues compiling dyninst, Srihari Radhakrishnan |
| Indexes: | [Date] [Thread] |