On Wednesday 29 May 2024 22:15:06 Pali Rohár wrote: > On Wednesday 29 May 2024 16:21:33 Martin Storsjö wrote: > > On Sun, 26 May 2024, Pali Rohár wrote: > > > > > WinMain() entry point defined by the application is called by mingw-w64 > > > startup code, more precisely by function main() from crtexewin.c file. > > > > > > mingw-w64 startup code in file crtexewin.c calls _ismbblead() function. > > > Function _ismbblead() is not available in earlier versions of crtdll.dll > > > and is completely missing in msvcrt10.dll library. > > > > Hmm, so at some point in the history of crtdll.dll, it does provide > > _ismbblead, but not in older versions. Can you mention in which version it > > appeared? > > > > lib32/crtdll.def.in does contain this symbol - so won't we have duplicate > > symbols if we provide it as a regular object file in the crtdll import > > library, while it's also provided by the import lib parts? Shouldn't we > > comment it out from the def file in this case? > > Ou, thats for spotting this. I have just done more compile and run tests > with msvcrt10.dll and figured out that without this fix, linker throws > errors. > > I will recheck crtdll case. For sure there must not be duplicate > symbols.
I have looked into my archive of crtdll.dll libraries. And I do not know in which version it appeared. Version of crtdll.dll seems to be a mess because libraries have version number in their PE resource directory. But I see there two crtdll.dll libraries with different set of symbols (one has _ismbblead symbol and one not) but both have same version. Next I checked all msvcrt10.dll libraries in my archive and all have same set of symbols. None of them has _ismbblead symbol. So one of the option how to solve this problem, is to load _ismbblead symbol at runtime via GetModuleHandle + GetProcAddress. In followup email I'm sending a change which implements it. I tested it now with xp and wine, and with two different (native) crtdll.dll versions and checked in debugger that the native symbol was resolved (for crtdll.dll version which has it). _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public