On Wed, 9 Aug 2017, Martell Malone wrote:

Martin added a patch to add support for stripping the @4, @8, @12 for
llvm-dlltool which led us to discover this issue.

With that in mind we should probably also add x86 to the unified def
proposal but at the same time keep the old i386 def files for binutils
We can use a flag to just change between them both at compile time.

The def files for x86 should be identical to x64, arm, arm64 etc bar
functions it does not have because we should not need any macro trickery we
discussed previously as InitializeCriticalSection will convert directly to
_InitializeCriticalSection when the short library is created, given the
fact we do not need the @4 this is directly equivalent to
_InitializeCriticalSection@4 in the old format.

No, you're drawing the completely wrong conclusions here, as I also said in the review discussion for llvm-dlltool.

We can't live without the stdcall suffixes in def files for i386, they're essential for actually being able to link to the import library (and dlltool can't make up the suffix out of thin air). It's only that when you link to it, the reference to the DLL should refer to a undecorated name (handled via -k for GNU dlltool afaik, handled via setting the "name type" to undecorate in lld/llvm-dlltool/link.exe).

// Martin

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Mingw-w64-public mailing list

Reply via email to