Index: /trunk/src/VBox/GuestHost/OpenGL/util/dll.c
===================================================================
--- /trunk/src/VBox/GuestHost/OpenGL/util/dll.c	(revision 75266)
+++ /trunk/src/VBox/GuestHost/OpenGL/util/dll.c	(revision 75267)
@@ -16,4 +16,7 @@
 
 #if defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(DARWIN) || defined(SunOS) || defined(OSF1)
+# include <iprt/assert.h>
+# include <iprt/err.h>
+# include <iprt/path.h>
 #include <dlfcn.h>
 #endif
@@ -274,9 +277,22 @@
 	};
 #elif defined(IRIX) || defined(IRIX64) || defined(Linux) || defined(FreeBSD) || defined(AIX) || defined(SunOS) || defined(OSF1)
-	if (resolveGlobal)
-		dll->hinstLib = dlopen( dllname, RTLD_LAZY | RTLD_GLOBAL );
-	else
-		dll->hinstLib = dlopen( dllname, RTLD_LAZY );
-	dll_err = (char*) dlerror();
+	{
+		int flags = RTLD_LAZY;
+		if (resolveGlobal)
+		   flags |= RTLD_GLOBAL;
+		dll->hinstLib = dlopen( dllname, flags );
+# ifndef IN_GUEST
+		/* GCC address sanitiser breaks DT_RPATH. */
+		if (!dll->hinstLib) do {
+			char szPath[RTPATH_MAX];
+			int rc = RTPathSharedLibs(szPath, sizeof(szPath));
+			AssertLogRelMsgRCBreak(rc, ("RTPathSharedLibs() failed: %Rrc\n", rc));
+			rc = RTPathAppend(szPath, sizeof(szPath), dllname);
+			AssertLogRelMsgRCBreak(rc, ("RTPathAppend() failed: %Rrc\n", rc));
+			dll->hinstLib = dlopen( szPath, flags );
+		} while(0);
+# endif
+		dll_err = (char*) dlerror();
+	}
 #else
 #error DSO
