cat > bug.d << CODE
interface ILock
{
void lock();
}
class Lock : ILock
{
void lock()
{
}
}
CODE
--------------------
dmd -c -m32 -fPIC bug
--------------------
_TMP3 LABEL NEAR
sub eax, 8 ; 0048 _ 83. E8, 08
jmp _D3bug4Lock4lockMFZv ; 004B _ E9, FFFFFFFC(PLT r)
It seems to me that the thunk needs to load the GOT because the class must not be in the same shared library as the caller of the interface.