diff --git a/src/corelib/plugin/qplugin.h b/src/corelib/plugin/qplugin.h index 35af6205ccf..6efdcfe7f6c 100644 --- a/src/corelib/plugin/qplugin.h +++ b/src/corelib/plugin/qplugin.h @@ -160,7 +160,6 @@ void Q_CORE_EXPORT qRegisterStaticPluginFunction(QStaticPlugin staticPlugin); # define QT_PLUGIN_METADATA_SECTION \ __attribute__ ((section (".qtmetadata"))) __attribute__((used)) #elif defined(Q_OS_MAC) -// TODO: Implement section parsing on Mac # define QT_PLUGIN_METADATA_SECTION \ __attribute__ ((section ("__TEXT,qtmetadata"))) __attribute__((used)) #elif defined(Q_CC_MSVC) @@ -200,12 +199,11 @@ template class QPluginMetaDataV2 using Payload = StaticPayload; #elif defined(Q_OF_ELF) # ifdef Q_CC_CLANG -// the metadata section doesn't work well with clang's sanitizer - QTBUG-97941 -# define QT_PLUGIN_METADATAV2_SECTION \ - __attribute__((section(".note.qt.metadata"), used, aligned(alignof(void *)), \ +# define QT_PLUGIN_METADATAV2_SECTION \ + __attribute__((section(".note.qt.metadata"), used, aligned(alignof(void *)), \ no_sanitize("address"))) # else -# define QT_PLUGIN_METADATAV2_SECTION \ +# define QT_PLUGIN_METADATAV2_SECTION \ __attribute__((section(".note.qt.metadata"), used, aligned(alignof(void *)))) # endif using Payload = ElfNotePayload; diff --git a/tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp index c1b939bf3ed..899586ed157 100644 --- a/tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp +++ b/tests/auto/corelib/plugin/qpluginloader/fakeplugin.cpp @@ -51,7 +51,7 @@ static constexpr bool IsDebug = false; #if defined(__ELF__) && PLUGIN_VERSION >= 1 // GCC will produce: -// fakeplugin.cpp:64:3: warning: ‘no_sanitize_address’ attribute ignored [-Wattributes] +// fakeplugin.cpp:64:3: warning: ‘no_sanitize’ attribute ignored [-Wattributes] __attribute__((section(".note.qt.metadata"), used, no_sanitize("address"), aligned(sizeof(void*)))) static const struct { unsigned n_namesz = sizeof(name);