+/* Weak symbols do not get resolved if using a Windows dll import lib.
+ Make the unwind registration references strong undefs. */
+#if DWARF2_UNWIND_INFO
+#define SHARED_LIBGCC_UNDEFS_SPEC \
+ "%{shared-libgcc: -u ___register_frame_info -u ___deregister_frame_info}"
+#else
+#define SHARED_LIBGCC_UNDEFS_SPEC ""
+#endif
I agree this is the safest way to handle weak linkage in libgcc_s_1.dll
While your at it you may as well clean up the use of
GetModuleHandle/GetProcAddress to get in cygming-crtbegin.