summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qlibraryinfo.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2019-10-02 07:56:16 -0700
committerThiago Macieira <thiago.macieira@intel.com>2019-10-03 08:26:51 -0700
commit932805807123833bb8f5ae9abda7e946f48d9f0c (patch)
treea98b1c378d4fa93cdf2bec9a9988a9bf8bad4715 /src/corelib/global/qlibraryinfo.cpp
parent5aa13ea144cff4dbadf12c08b7aa49646347e186 (diff)
Fix crash when running QtCore: Stack is misaligned on x86-64
When our ELF entry point function is started by the kernel, the stack is aligned at 16 bytes. However, the stack is expected to be off by 8, due to a preceding CALL instruction which didn't exist. This cauases a crash further down as the compiler may generate aligned stack access. Change-Id: I1496b069cc534f1a838dfffd15c9dc4ef9e3869e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/global/qlibraryinfo.cpp')
-rw-r--r--src/corelib/global/qlibraryinfo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index 5634d6e6c3..f2ada4ab30 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -709,10 +709,14 @@ QT_END_NAMESPACE
#include "private/qcoreapplication_p.h"
+QT_WARNING_DISABLE_GCC("-Wattributes")
+QT_WARNING_DISABLE_CLANG("-Wattributes")
+QT_WARNING_DISABLE_INTEL(2621)
+
extern const char qt_core_interpreter[] __attribute__((section(".interp")))
= ELF_INTERPRETER;
-extern "C" void qt_core_boilerplate();
+extern "C" void qt_core_boilerplate() __attribute__((force_align_arg_pointer));
void qt_core_boilerplate()
{
printf("This is the QtCore library version " QT_BUILD_STR "\n"