From: Gunnar Dalsnes
I made some changes so neither crtdll/msvcrt import from self
anymore. Its strange that the linker is not smart enough to
resolve symbols without having to import from self, but it
could be "by design".
The linker is crazy, because it does not complain when you export
non-existing symbols/functions. Anyone who calls these functions
will crash in mysterious ways (been there). The bug might be
triggered by the option --enable-stdcall-fixup??? (just guessing)
I think the problem is that gcc implicitly adds "-lmsvcrt" to its command
line. So if you export a non-existing function the linker will just import
it from libmsvcrt.a. There probably is a gcc option to turn the implicit
addition of "-lmsvcrt" (and other standard libs) off.
Gé van Geldorp.