Can I use dt_infect to work on .so file?
sczhengyabin opened this issue · comments
Example case:
- excutable:
a.out
- linked .so file:
libmath.so
- function in .so file that called by excutable:
int add(int, int)
- target: Using function interposition to print the arguments of
add
.
I tried with dt_inject. Put a new int add(int, int)
function in libevil.so
in the same manner as the example.
Then tried:
./inject libevil.so libmath.so
Outputs says "Successfully injected".
However when I tried to run a.out
, the loader came with the error:
ELF load command address/offset not properly aligned.