[Mono-dev] Mixed Mode Assemblies

Tom Spink tspink at gmail.com
Fri Jul 8 13:40:17 EDT 2011

On 8 July 2011 18:04, Alex <xtzgzorex at gmail.com> wrote:

> Hi,
> While this is theoretically possible, it would be completely
> nonstandard. How do you actually want to store CIL /and/ native code
> in ELFs? I'm not very familiar with the format, but I can't imagine
> it'd be a clean endeavor.
> Regards,
> Alex
Hi Alex,

Why do you think that?  I've actually pondered this approach for a while, as
it could potentially bring a couple of benefits.

At the moment, the metadata is stored in the PE's text section.  So, why not
just store it in the ELF's text section?  All the PE headers are completely
ignored by the Windows runtime loader - they don't care about it (except for
the CLR data directory offset, and text section offset, which is required to
calculate RVAs).

Also, if you wrap the metadata in an ELF container, you could potentially
write stubs to load the mono runtime.

Whilst I've not dug into the Mono image loader code, I can't imagine it'd be
/too/ difficult to make it load an ELF binary, probably converting it to a
pluggable system along the way.

Tom Spink
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20110708/85717645/attachment.html 

More information about the Mono-devel-list mailing list