[swift-dev] COFF indirect addressing and protocol conformance tables ABI issues

Saleem Abdulrasool compnerd at compnerd.org
Sun Jul 3 16:40:11 CDT 2016

Hello again,

I come bearing more problems :-).

I seem to have found another point in the ABI which prevents an easy port
of swift to Windows without an emulation layer underneath.  This time it
deals with the protocol conformance table.  The table is constructed with a
direct reference to protocol.  However, because the protocol lies in an
external module, this ends up being a problem as it must be indirectly

There is a workaround in place for generating a GOT equivalent entry,
however, that still doesnt indirect through the pointer, which needs to be
done to address the executable model on Windows.

This along with the DLL storage changes (
https://github.com/apple/swift/pull/2080) are the currently two known ABI
issues preventing the port to windows (with cross-compiling!).  Im hopeful
that the former can be merged soon.  If we can work out a way to address
this last issue, I think that it should be possible to get a complete
windows port of swift working (modulo API completeness) shortly thereafter
without the need for any emulation layer (i.e. cygwin or MinGW)!

Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160703/2720cd96/attachment.html>

More information about the swift-dev mailing list