On 20/07/2021 16.52, Florian Weimer wrote:
Currently, the GNU/Linux ABI does not really specify whether the thread
pointer (the address of the TCB) may change at a function boundary.
[...]
One important piece of software for GNU is QEMU (not just for GNU/Linux,
Hurd development also benefits from virtualization). QEMU uses stackful
coroutines extensively. There are some hard-to-change code areas where
resumption happens across threads unfortunately. These increasingly
cause problems with more inlining, inter-procedural analysis, and a
general push towards LTO (which is also needed for some security
hardening features).
Thanks a lot for your mail, Florian!
As a context for those who read about this for the very first time: We're
currently facing the problem that the coroutines in QEMU fail when compiling
QEMU with -flto on a non-x86 architecture, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1952483#c6
Should the GNU toolchain offer something to help out the QEMU
developers?
I guess that would be extremely helpful...
Thomas