mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
When plt hooking on linux, need to patch all hooked functions
* If a library is loaded as RTLD_DEEPBIND it might be linked directly against libGL, in which case we need to plt hook the functions we care about as well as just dlopen.
This commit is contained in:
@@ -85,6 +85,15 @@ void plthook_lib(void *handle)
|
||||
return;
|
||||
|
||||
plthook_replace(plthook, "dlopen", (void *)dlopen, NULL);
|
||||
|
||||
for(FunctionHook &hook : functionHooks)
|
||||
{
|
||||
void *orig = NULL;
|
||||
plthook_replace(plthook, hook.function.c_str(), hook.hook, &orig);
|
||||
if(hook.orig && *hook.orig == NULL && orig)
|
||||
*hook.orig = orig;
|
||||
}
|
||||
|
||||
plthook_close(plthook);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user