diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/plugin/qlibrary.cpp | 5 | ||||
-rw-r--r-- | src/corelib/plugin/qlibrary.h | 3 | ||||
-rw-r--r-- | src/corelib/plugin/qlibrary_unix.cpp | 4 |
3 files changed, 11 insertions, 1 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 */ diff --git a/src/corelib/plugin/qlibrary.h b/src/corelib/plugin/qlibrary.h index 77fe432761..327af8aada 100644 --- a/src/corelib/plugin/qlibrary.h +++ b/src/corelib/plugin/qlibrary.h @@ -53,7 +53,8 @@ public: ResolveAllSymbolsHint = 0x01, ExportExternalSymbolsHint = 0x02, LoadArchiveMemberHint = 0x04, - PreventUnloadHint = 0x08 + PreventUnloadHint = 0x08, + DeepBindHint = 0x10 }; Q_DECLARE_FLAGS(LoadHints, LoadHint) diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index 4f96f3bccf..b178c173c5 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp +++ b/src/corelib/plugin/qlibrary_unix.cpp @@ -171,6 +171,10 @@ bool QLibraryPrivate::load_sys() dlFlags |= RTLD_LOCAL; } #endif +#if defined(RTLD_DEEPBIND) + if (loadHints & QLibrary::DeepBindHint) + dlFlags |= RTLD_DEEPBIND; +#endif // Provide access to RTLD_NODELETE flag on Unix // From GNU documentation on RTLD_NODELETE: |