[Mono-dev] How to access AOTed assembly code?
Robert Jordan
robertj at gmx.net
Tue Jan 24 21:08:28 UTC 2012
On 24.01.2012 19:39, Kamal Aboul-Hosn wrote:
> Hi, everyone,
>
> If I call mono --aot=static,asmonly on a dll to generate a .s file,
> how can I get Mono to load the generated AOT'ed assembly if I include
> the .s in a native .so I'm building myself as part of an application?
> It seems Mono normally just goes looking for a .so file for the
> AOT'ed code. Is it possible to get Mono to use the linked in AOT'ed
> code in the same native library as the rest of my application? Please
> let me know if I can provide any more details.
First, you must embed the runtime as described here:
http://mono-project.com/Embedding_Mono
Second, you must register the static AOT assembly with
mono_aot_register_module. See the description of
--aot=static on mono's man page.
This assembly can be consumed like any other file-based
assembly using the embedding API.
Robert
More information about the Mono-devel-list
mailing list