[PATCH] mscoree: Implement VTable fixup for x86_64 architecture.
gofmanp at gmail.com
Wed Jan 20 14:59:30 CST 2016
On 01/20/2016 11:07 PM, Vincent Povirk wrote:
> I don't see anything obviously wrong here, but I also have no way of
> testing it, since we can't compile methods without loading the class
> library dll's.
I have progressed a bit in attempts to load mixed code DLL into 64-bit
process. To do this I built wine-mono pure assembly dlls (mscorlib and
others) with -platform:x64 flag which provides x86_64 pure assembly dlls
and thus allows to workaround DLL load issue.
It crashes from within erroneously called callbacks on mono init. This
is fixed by my 2nd patch. It helps to pass through init and to see
messages from mono which are displayed through a callback.
In this state ReallyFixupVTable is called from x86_64 thunk, where
mono_marshal_get_vtfixup_ftnptr() starts executing 64-bit mixed code
DLL's assembly initialization, but currently fails with my DLL on
"invalid IL instruction" somewhere around System.IntPtr.ctor call (the
same class works on i686), which is probably some mono issue. So I
cannot come up with a fully working test case for now, though I did not
give up yet.
>> +#elif __x86_64__ /* !defined(__i386__) */
> Later in the patch it says defined(__x86_64__). I have no idea whether
> this distinction matters.
Comments say "defined", while there are #if's. It was originally like
this when it was __i386__ only, I tried to minimize the changes. #if
does work both for i386 and x86_64 (though #ifdef would work either).
Should I fix comments for consistency?
More information about the wine-devel