Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.0
-
None
-
openSUSE Tumbleweed
Description
With -reduce-relocations, the shared objects are linked like this:
-shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,.../QtCore.dynlist
This combination results in global symbols being bound internally, but still exported. It breaks when such a library is used with an executable with copy relocations.
In one case, this happened and was the result of a call to QCoreApplication::instance() getting inlined, accessing the global QCoreApplication::self directly.
This lead to the executable reading from a different copy of the variable than libQt5Core.so wrote to, causing a nullptr deref.
This breaks even with binutils 2.34 if -Wl,-Bsymbolic-functions is omitted.
Downstream bug report: https://bugzilla.opensuse.org/show_bug.cgi?id=1175278
Binutils bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=26407