diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-11-14 10:08:21 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-11-19 22:51:03 -0800 |
commit | 892d5607d0b1c9e010ea10a1123e68741c46c21e (patch) | |
tree | e23b8ba93194383cede7da24b3409a24f9c795ca /src/corelib/plugin/qlibrary.cpp | |
parent | 235173175b64ea4a5571373a4c37c35b4e18d14f (diff) |
QPluginLoader: add COFF PE file parser
Fixes: QTBUG-67461
Docs: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format
Change-Id: I5e52dc5b093c43a3b678fffd16b77bf9a8f2b17e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/plugin/qlibrary.cpp')
-rw-r--r-- | src/corelib/plugin/qlibrary.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 5a8c647c27..d4ee833554 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -59,6 +59,7 @@ #include <private/qloggingregistry_p.h> #include <private/qsystemerror_p.h> +#include "qcoffpeparser_p.h" #include "qelfparser_p.h" #include "qfactoryloader_p.h" #include "qmachparser_p.h" @@ -206,6 +207,8 @@ static QLibraryScanResult qt_find_pattern(const char *s, qsizetype s_len, QStrin return QElfParser::parse({s, s_len}, errMsg); #elif defined(Q_OF_MACH_O) return QMachOParser::parse(s, s_len, errMsg); +#elif defined(Q_OS_WIN) + return QCoffPeParser::parse({s, s_len}, errMsg); #endif QByteArrayView pattern = QPluginMetaData::MagicString; static const QByteArrayMatcher matcher(pattern.toByteArray()); |