From 21dd9b96a57846f916ed9654d93bbfdb89b1c1a8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 12 Sep 2021 20:35:39 -0700 Subject: QElfParser: stop trying to look into the .rodata section The return code NoQtSection was not being handled at all, so hasMetaData remained equal to false. This was probably not intended, but has been like that since Qt 5.0. See previous commit for details. Change-Id: I42eb903a916645db9900fffd16a4445eff9a082c Reviewed-by: Oswald Buddenhagen Reviewed-by: Allan Sandfeld Jensen --- src/corelib/plugin/qelfparser_p.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/corelib/plugin') diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 07f9a5323b..bbcfe2f865 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -204,7 +204,7 @@ auto QElfParser::parse(const char *dataStart, ulong fdlen, const QString &librar qDebug() << "++++" << i << shnam; #endif - if (qstrcmp(shnam, ".qtmetadata") == 0 || qstrcmp(shnam, ".rodata") == 0) { + if (qstrcmp(shnam, ".qtmetadata") == 0 ) { if (!(sh.type & 0x1)) { if (shnam[1] == 'r') { if (lib) @@ -227,8 +227,7 @@ auto QElfParser::parse(const char *dataStart, ulong fdlen, const QString &librar } *pos = sh.offset; *sectionlen = sh.size; - if (shnam[1] == 'q') - return QtMetaDataSection; + return QtMetaDataSection; } s += e_shentsize; } -- cgit v1.2.3