Wow.

Well, that was fast.   Congrats Kornel!
 
-----Original Message-----
From: Kornél Pál <[EMAIL PROTECTED]>
Cc:  <mono-devel-list@lists.ximian.com>
To: Miguel de Icaza <[EMAIL PROTECTED]>

Sent: 4/17/2008 3:17:24 AM
Subject: Re: [Mono-dev] Mono on wine redux

Hi,

> From: "Miguel de Icaza" <[EMAIL PROTECTED]>
>> But what percent of .net apps are pure?  If that fraction is small,
>> as I suspect it is, then for Mono to really rock the world, it's going
>> to have to tackle impure apps, too.  That is of course incredibly 
>> difficult,
>> and would require considerable cooperation between the Mono and Wine 
>> projects.
>
> It is very hard to run into a mixed-mode assembly in the wild;   They do
> happen, but they are rare.   I can only think of three projects that had
> needed them in the history of Mono.

I've done some work on this. And actually I managed to run mixed-mode 
assemblies.

Note that it is only possible on Windows because native code is usually 
platform (arch and OS as well) dependent.

I implemented support for loading image files using LoadLibrary so that the 
NT loader will take care of the image patching. I also had to patch the 
in-memory image of mscoree.dll so that export address table point to 
functions in mono.dll that is required for LoadLibrary support. This also 
will enable Wine (and Windows is someone is willing to replace or modify his 
on-disk mscoree.dll image) to execute managed images using CreateProcess 
without creating a mono.exe child process. This was the hardest part.

IJW thunks (managed-to-native) are really P/Invoke methods with function RVA 
stored in method body RVA so it was very easy to implement, I only had to 
remove code preventing IJW from work.

V-table fixups (native-to-managed) are not difficult either but requires 
it's own wrapper methods so my current implementation probably will need 
improvements.

Note that this still will not make Mono able to use MSVCRT because that uses 
unmanaged API of .NET Framework that isn't implemented by Mono.

I am stilll working on a cleaned-up patch but will send to the list soon.

Kornél 


_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to