From 78b03633faf08609668b14553863f9aebdb113d7 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 11 Feb 2019 14:33:35 +0000 Subject: [PATCH] Even RTLD_GLOBAL loads can be linked to libraries we care about * When a library libBlah.so is loaded, it might be linked to libGL.so. If so, we need to go populate our original functions and perform any callbacks when libGL.so gets loaded as a dependency. This is true even if the library isn't loaded as LOCAL. --- renderdoc/os/posix/linux/linux_hook.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/renderdoc/os/posix/linux/linux_hook.cpp b/renderdoc/os/posix/linux/linux_hook.cpp index efa2bd102..bc65bae2d 100644 --- a/renderdoc/os/posix/linux/linux_hook.cpp +++ b/renderdoc/os/posix/linux/linux_hook.cpp @@ -161,10 +161,9 @@ void *intercept_dlopen(const char *filename, int flag, void *ret) } } - // for local library loads, this library might depend on one we care about, so check again as we + // this library might depend on one we care about, so check again as we // did in EndHookRegistration to see if any library has been loaded. - if((flag & RTLD_GLOBAL) == 0) - CheckLoadedLibraries(); + CheckLoadedLibraries(); return ret; }