From: John R. <jr...@bi...> - 2020-03-03 15:39:09
|
> I am trying to make a tool that intercepts the call to main, and then > call an arbitrary function within the guest with arbitrary function > arguments. This can be done without valgrind by using LD_PRELOAD environment variable and RTLD_NEXT (see "man dlsym"): LD_PRELOAD=main_interceptor.so ./my_app args... where main_interceptor.so is a shared library that has a function main() and that can call the original main() by using dlsym(RTLD_NEXT, "main"). |