Patches for CYGWIN, was Re: [Mono-list] Jit compiler
Thu, 20 Dec 2001 13:42:22 -0000
Make this patch to mono/metadata/image.c:
- Replace the fopen() call in do_mono_image_open() with:
image->f = fopen (fname, "rb"); /* open binary */
image->f = fopen (fname, "r");
This will stop CRLF conversion; I'm guessing your cygwin
filesystem is mounted as "textmode" (type "mount").
You'll probably need to disable the mmap() call in rawbuffer.c
- Replace the call to mmap() with the following:
mmap_ptr = (char *) -1;
mmap_ptr = mmap (0, end - start, prot, flags, fd, start);
Someone else logged this issue, check out the list archives
for September (Sep 29th?). Seems there's a bug in mmap() still.
Rebuild everything, and see how far this gets you.
How do we get these patches applied, or at least reviewed?
----- Original Message -----
From: "adc" <email@example.com>
Sent: Thursday, December 20, 2001 1:16 PM
Subject: [Mono-list] Jit compiler
> I have downloaded the latest anonCVS and I am trying to run the
disassembler on some of the tests in the tests directory. Once I have
compiled these with the Microsoft C# compiler I execute, for example
> ./monodis ../tests/ackermann.exe
> but I recieve an error about an assertion in loader.c at line 73.
> This assertion asserts that the assembly has been opened without error
(which it obviously hasn't) the error appears to be happening in the
mono_image_open function in image.c. This seems to happen with every
executable I throw at it, even extremely simple programs.
> Do we have some tests CLI executables which are loaded by the metadata
library somewhere that I can get my hands on?
> I ask as for my disertation I am going to investigate the worthiness of
writing an assembler from CIL executables to native code executables, what
optimisations etc can be gained by the fact that we no longer have
compilation speed as a major restriction (obviously we don't want a compiler
that takes forever but it would then be of less concern).
> Mono-list maillist - Monofirstname.lastname@example.org