[Mono-dev] [PATCH] Fixes and modifications for MSVCRT support

Pál Kornél kornelpal at gmail.com
Mon May 5 05:12:28 EDT 2008


Hi,

These patches contain some fixes that seem to be required for MSVCRT 
support.

Note that I wasn't able to execute even a simle Hello World application that 
uses MSVCRT yet but made some progress with these fixes.

The most weird thing is that when the assembly is compiled as pure IL MSVC++ 
still uses vtfixup. But not the usual way. It uses ResolveMethodHandle along 
with GetFunctionPointer that is basically the same thing that vtfixup is 
without the marshaling.

Even worse, MSVC++ assumes that static fields with and RVA point to the 
actual PE image. The thable it uses for resolving method is not defined 
properly in the CLI image but only it's start and end is defined. This even 
breaks ildasm-ilasm round trip but MSVC++ assumes this. The mini.c and 
jit-icalls.c is supposed to support this but I know that this would break 
other platforms maybe even x86 Windows as well.

MSVC++ also generates code that marshals pointers.

Kornél 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: msvcrt_partial.diff.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080505/9430e4f7/attachment.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: msvcrt_mcs.diff.txt
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080505/9430e4f7/attachment-0001.txt 


More information about the Mono-devel-list mailing list