LD_PRELOAD hooks some functions for the entire process, but I need to hook a particular function for only one dynamically linked library by its name.
LD_PRELOAD为整个进程挂钩了一些函数,但是我需要通过名称只为一个动态链接的库挂钩一个特定的函数。
1 个解决方案
#1
6
See the article Redirecting functions in shared ELF libraries. There's code of ELF hooking attached.
请参阅文章重定向共享ELF库中的函数。有附加ELF挂钩的代码。
#1
6
See the article Redirecting functions in shared ELF libraries. There's code of ELF hooking attached.
请参阅文章重定向共享ELF库中的函数。有附加ELF挂钩的代码。