<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Jul 5, 2016, at 5:56 PM, Saleem Abdulrasool <<a href="mailto:compnerd@compnerd.org" class="">compnerd@compnerd.org</a>> wrote:</div><div class=""><div dir="ltr" class="">On Tue, Jul 5, 2016 at 10:30 AM, John McCall <span dir="ltr" class=""><<a href="mailto:rjmccall@apple.com" target="_blank" class="">rjmccall@apple.com</a>></span> wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> On Jul 3, 2016, at 2:40 PM, Saleem Abdulrasool <<a href="mailto:compnerd@compnerd.org" class="">compnerd@compnerd.org</a>> wrote:<br class="">
> Hello again,<br class="">
><br class="">
> I come bearing more problems :-).<br class="">
><br class="">
> 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 addressed.<br class="">
><br class="">
> 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.<br class="">
<br class="">
</span>Is it not possible to emit the GOT equivalent entry as a reference to the appropriate entry in the import lookup table?</blockquote><div class=""><br class=""></div><div class="">I had tried that, but it would still just be a constant reference to the value rather than the synthetic. Perhaps I am misunderstanding something?</div></div></div></div></div></blockquote><div><br class=""></div></div>I don't know what you mean. I assume this is the reference to the protocol structure from the global protocol-conformances list. This reference is a relative offset, either directly to the protocol structure or indirectly to a global containing a pointer to an external protocol structure. PE's import lookup table is an array of pointers to external objects.<div class=""><br class=""></div><div class="">I could easily believe that COFF doesn't allow us to express a relative offset to an entry in the import lookup table. However, it sounds like you think this needs to be *doubly* indirected, i.e. the conformance list needs to be a relative offset to a variable containing a pointer to a variable containing a pointer to the import lookup table. I'm not sure why that would be.</div><div class=""><br class=""></div><div class="">John.</div></body></html>