From 386c830b1de80d11572eb71505a76693b3cfb616 Mon Sep 17 00:00:00 2001 From: Peter Gal Date: Mon, 10 Apr 2017 17:08:56 +0200 Subject: [PATCH] Load wrapped library early in case of Android On newer Android it is not possible to use the LD_PRELOAD functionality. The target application should be directly linked with the RenderDoc library. However in that case we also need to load the target library early, so a simple implementation for the PosixHookLibrary is added. --- renderdoc/os/posix/android/android_hook.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renderdoc/os/posix/android/android_hook.cpp b/renderdoc/os/posix/android/android_hook.cpp index 898c1a9a5..86e12d048 100644 --- a/renderdoc/os/posix/android/android_hook.cpp +++ b/renderdoc/os/posix/android/android_hook.cpp @@ -24,10 +24,13 @@ #include "os/posix/posix_hook.h" +#include + void PosixHookInit() { } void PosixHookLibrary(const char *name, dlopenCallback cb) { -} \ No newline at end of file + cb(dlopen(name, RTLD_NOW)); +}