I am trying to do some instruction analysis of an executable-binary using Intel Pin-tool instrumentation.
Upon analyzing the executed instructions in my Pin-tool, I am observing that the instruction address (program counter) value-range received is very different from what I otherwise observe when analyze the disassembly of the compiled code using objdump -d -S <binary>
. I am testing it on the standard Linux /bin/ls
executable-binary.
As per my understanding, Pin modifies the original binary to put its own "hooks" to gather execution related information which invoke call-backs in our desired Pin-tool for analysis. So, this naturally should lead to the actually executed binary as being different from the original. Unfortunately, I do not know other under-the-hood stuff about Pin.
I was wondering if there was any way to preserve the original code layout, or obtain some correspondence between the old binary and new binary instruction addresses?