https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108261
Iain Sandoe <iains at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2023-01-02 Status|UNCONFIRMED |NEW --- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> --- (marking as New since I can repeat this on more than one platform) one other datum: adding -fscaffold-static makes the shared library version work on both Linux and Darwin, which seems to support the hypothesis that the problem is to do with how dynamic initialisation is constructed.