From 87362f3f58056e29563936102b29070f3e7e945a Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Thu, 10 May 2012 14:52:41 +1000 Subject: [PATCH] Add private API for finding symbols on Linux Add an API for use by declarative that allows searching for a symbol that has been loaded, without opening a specific library. This makes it possible for declarative to determine if the profiling library has been preloaded, and to call functions on it that enable / disable / save the current profile. Change-Id: I2ec12d9babea2a152990c19735e98d4d7c10a062 Reviewed-by: Martin Jones Reviewed-by: Lars Knoll --- src/corelib/plugin/qlibrary_unix.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 3700d2ac9c..7062a37241 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -258,6 +258,13 @@ bool QLibraryPrivate::unload_sys() return true; } +#ifdef Q_OS_LINUX +Q_CORE_EXPORT QFunctionPointer qt_linux_find_symbol_sys(const char *symbol) +{ + return QFunctionPointer(dlsym(RTLD_DEFAULT, symbol)); +} +#endif + #ifdef Q_OS_MAC Q_CORE_EXPORT QFunctionPointer qt_mac_resolve_sys(void *handle, const char *symbol) {