On 11.12.2024 20:20, Pali Rohár wrote:
If you are open for this idea, that it is not totally stupid thing
(I was not sure that is why I opened this discussion before trying to
implement anything) I can try to prepare some PoC patch.
FWIW, I agree that there's room for improvement, and I think it's worth
experimenting further with that idea.
For some context, Wine takes this a step further by using its own .spec
format alongside a tool (winebuild). The .spec file abstracts mangling
entirely: users specify the calling convention and argument types, and
winebuild handles the mangling. While this provides more information
than is strictly necessary for import libraries, it's also beneficial
for other purposes in Wine, like autogenerated debug traces (see [1] for
a kernel32 example). That said, something like this would be overkill
for what mingw-w64 needs. I just thought it was worth mentioning as the
problem is more common.
In fact, I’d expect more Windows developers to occasionally face a
similar dilemma. I could imagine having an option in dlltool similar to
--kill-at that would remove the suffix in the import library symbol name
(in addition to the export name) on targets other than i386, essentially
doing what you propose at a different level. But again, that’s a
different topic. If users were fine for so long, it's probably fair to
assume that the issue is not too bad and just worry about mingw-w64
internal needs.
Thanks,
Jacek
[1]
https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/kernel32/kernel32.spec
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public