On Sunday 03 August 2025 16:23:05 LIU Hao wrote: > 在 2025-8-3 01:33, Pali Rohár 写道: > > Older WinSDK have thunk32.lib import library which imports them from > > kernel32.dll. Seems that those functions from 32-bit kernel32.dll > > library are used for calling 16-bit windows libraries. Part of older > > WinSDK is some MS compiler tool which generates assembly source code > > which calls those functions. > > > > So those functions are either called by autogenerated code by MS tools, > > or possibly also by inline asm code in C source files. > > > > I send this change for a completeness to enable import symbols which are > > available in older WinSDK. > > While we have patch #2 and #3 on this topic, they seem to be doing opposite > things? Patch #2 attempts delete symbols from libkernel32 (to prefer liblz32 > & libonecore), but patch #3 seems to add symbols that really belong > elsewhere.
Not exactly. About patch #2 you are right, symbols belongs to lz32.dll. But about patch #3, those symbols belongs to kernel32.dll. Just MS toolchain has some of kernel32.dll symbols in kernel32.lib import lib and some in thunk32.lib import lib and some has in th32.lib. It is quite strange in ms that one dll has 3 import libs. mingw-w64 does not have th32.lib import library (which contains e.g. CreateToolhelp32Snapshot) and that symbol is in libkernel32.a import lib. So I thought that in mingw is direction that one DLL has one import library. Hence I sent that change #3 which enables kernel32.dll symbols of thunk32.lib via kernel32.def file. That was my motivation, I'm writing it just for explanation. > I kinda believe #2 is the right direction, so #3 should be the wrong one. > And despite that, as these symbols do not exist on mainstream Windows any > more, unless they solve known issues, they will not be accepted. Fair enough. _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
