On Fri, 8 Aug 2025, LIU Hao wrote:
It's because GNU binutils produces import libraries in the traditional, long
format, while MSVC and LLVM produce import libraries in the modern, short
format [1].
In the short format, each import member has its own DLL name, so it's
possible to provide symbols from different DLLs in a single import library.
That's how OneCore.lib works.
It's totally possible to have a single import library provide symbols for
many different DLLs even with the long format - our libucrt.a, and
libonecore.a as well, are examples of that. Each import member object
references symbols that contribute the right .idata section contents, for
getting the relevant DLL names imported.
The reverse - having multiple import libraries provide symbols that end up
imported from the same DLL, also works for both formats, but with long
import libraries, it potentially ends up producing multiple import
directory entries for the same DLL (which still is valid afaik).
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public