[Mono-devel-list] RE: [Mono-list] IL code references to corlib and mscorlib

Jackson Harper jackson at latitudegeo.com
Wed Jul 16 12:14:41 EDT 2003


There is also an --mscorlib flag to monodis that changes this behavoir.

Jackson



-----Original Message-----
From: Mark Easton [mailto:measton at tebiki.co.uk]
Sent: Wednesday, July 16, 2003 8:05 AM
To: Jackson Harper
Subject: RE: [Mono-list] IL code references to corlib and mscorlib


Not at all.

M

-----Original Message-----
From: Jackson Harper [mailto:jackson at latitudegeo.com] 
Sent: 16 July 2003 15:56
To: Mark Easton
Cc: mono-list at lists.ximian.com
Subject: Re: [Mono-list] IL code references to corlib and mscorlib


Hello,

	Right now our il assembler simply treats corlib as an alias for
mscorlib. So if you use [corlib]System.Console::WriteLine () you are
really getting [mscorlib]System.Console::WriteLine (). MS .NET should
obviously have no problems with that, and I would guess that other
runtimes also map 'mscrolib' to the name of their corlib. 

	This could be considered a monodis bug though. We really
shouldn't be
relying on aliases in the assembler because in theory people could
create their code with monodis and assemble it with someone elses
assembler. Would you mind filing a bug report?

Jackson



On Wed, 2003-07-16 at 03:57, Mark Easton wrote:
> I'm trying to understand how IL works and have come a cropper.
> 
> When I look at some IL code that was generated by mcs I can see that
is
> references mscorlib for class declarations e.g. 
> 
>     .class private auto ansi beforefieldinit ComputerName extends
> [mscorlib]System.Object 
> 
> but that it then references corlib in the rest of the code e.g. 
> 
>     IL_0007: call void class [corlib]System.Console::WriteLine(string)
> 
> While I understand that the mono runtime must map mscorlib references
to
> corlib, I have no idea how other runtimes, such as MS.NET or PNET, can
> deal with references to corlib?
> 
> Any help would be most appreciated as my head is really getting
twisted
> into knots now - and my wife insists that's her job.
> 
> TIA
> 
> Mark
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-devel-list mailing list