summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qlibrary.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-10-21 11:15:55 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2014-12-02 14:38:36 +0100
commit864cf2a6cd658e4b98e1248e9aaab6fe6afc038f (patch)
tree61ca5ea284c9155af09c0d10d1af0989306e9137 /src/corelib/plugin/qlibrary.cpp
parentf6eb3c220b17ecb56befe1a1ea2241ca6d5ab0c8 (diff)
Add DeepBind option to QLibrary
Adds an option to request the RTLD_DEEPBIND flag to dlopen. On Linux this can be used to force a library to resolve global symbols locally instead of using the similarly named symbols already loaded. This makes it possible to load and use plugins linked against Qt 4 without crashing. [ChangeLog][QtCore][QLibrary] Added DeepBindHint which maps to RTLD_DEEPBIND on Linux making it possible to load libraries with external symbols that clash with already loaded ones, such as plugins linked to Qt4. Change-Id: I4edb4af68e4a47e932a87d108360dba8d91dc34a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/plugin/qlibrary.cpp')
-rw-r--r--src/corelib/plugin/qlibrary.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 7bc6d1cc47..c9ce5c342e 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -168,6 +168,11 @@ QT_BEGIN_NAMESPACE
Prevents the library from being unloaded from the address space if close()
is called. The library's static variables are not reinitialized if open()
is called at a later time.
+ \value DeepBindHint
+ Instructs the linker to prefer definitions in the loaded library
+ over exported definitions in the loading application when resolving
+ external symbols in the loaded library. This option is only supported
+ on Linux.
\sa loadHints
*/