https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81879
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2019-02-24 CC| |marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> --- Confirmed. I can confirm that the difference in resolution file is the problem: 750 6dacea834fb099d1 PREVAILING_DEF_IRONLY _ZNKSt5ctypeIcE8do_widenEc vs. 750 1b64a3a32ab1e36a PREEMPTED_REG _ZNKSt5ctypeIcE8do_widenEc Note that on a native x86_64-linux-gnu system, the resolution is also PREVAILING_DEF_IRONLY with -static option. It's also visible with: x86_64-w64-mingw32-nm --plugin /usr/lib64/gcc/x86_64-w64-mingw32/8.2.0/liblto_plugin.so simpler.o | grep do_widen 00000000 T _ZNKSt5ctypeIcE8do_widenEc while on a native linux system: nm s2.o | grep do_widen 00000000 W _ZNKSt5ctypeIcE8do_widenEc T == The symbol is in the text (code) section. W == The symbol is a weak object.