The linker script assumes that std::mbstate_t has the name __mbstate_t for linkage purposes, but that's not necessarily true. For mingw32 it's just a typedef for int, so the patterns don't match. This adds a new mingw32-specific pattern for codecvt_byname's constructors and destructors, and relaxes the patterns for codecvt so they match __mbstate_t or int. Tested x86_64-linux and powerpc64le-linux, committed to trunk. I plan to commit this to trunk and gcc-5-branch soon.