Hi,
I utilize the instrace_simple.so of dynamorio to trace the instruction of a simple program a.out.
When executing `ldd a.out`
The a.out is dynamic linked with:
linux-vdso.so.1 => (0x00007ffff7ffa000)
libc.so.6 => /lib64/libc.so.6 (0x00007ffff7a0d000)
/lib64/ld-linux-x86-64.so.2 (0x00007ffff7ddb000)
However, when I utilize the instrace_simple.so to trace the program with:
./bin64/drrun -late -c ./api/bin/libinstrace_simple.so -- ../../testcase/a.out
I dump the full_path of each module:
Binary /home/testcase/a.out Entry Point: 0x0000000000400000, 0x0000000000401060, 0x0000000000405000
Binary /home/dynamorio/build/lib64/release/libdynamorio.so Entry Point: 0x0000000071000000, 0x0000000071110251, 0x0000000071220000
Binary /home/dynamorio/build/api/bin/libinstrace_simple.so Entry Point: 0x0000000072000000, 0x0000000072002490, 0x0000000072007000
Binary /usr/lib64/
libc-2.17.so Entry Point: 0x00007ffff7a0d000, 0x00007ffff7a2f660, 0x00007ffff7ddb000
Binary /usr/lib64/
ld-2.17.so Entry Point: 0x00007ffff7ddb000, 0x00007ffff7ddc140, 0x00007ffff7fff000
Binary /home/dynamorio/build/lib64/release/libdrpreload.so Entry Point: 0x00007ffff7fe6000, 0x00007ffff7fe7080, 0x00007ffff7ff8000
Binary [vdso] Entry Point: 0x00007ffff7ffa000, 0x00007ffff7ffa600, 0x00007ffff7ffc000
The a.out running under dynamorio is relinked with /usr/lib64/
libc-2.17.so rather than the /lib64/libc.so.6.
The LD_LIBRARY_PATH is set as:
LD_LIBRARY_PATH=/lib64:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib:/opt/rh/devtoolset-9/root/usr/lib64/dyninst:/opt/rh/devtoolset-9/root/usr/lib/dyninst:/opt/rh/devtoolset-9/root/usr/lib64:/opt/rh/devtoolset-9/root/usr/lib
How can I relink a.out with /lib64/libc.so.6 under the dynamorio?
I'm looking forward to your help.