Bug 52535 - Offer workflow to pre-load dynamic AOT libraries so that Assembly.Load(byte[]) can function
Summary: Offer workflow to pre-load dynamic AOT libraries so that Assembly.Load(byte[]...
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-02-15 19:57 UTC by Chris Hamons
Modified: 2017-04-12 15:09 UTC (History)
4 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description Chris Hamons 2017-02-15 19:57:35 UTC
In this forum thread:


A XM user would like to use Assembly.Load(byte[]) to load an assembly while still consuming the AOT they generated before.

In theory, they could use mono_aot_register_module before loading the assembly, except for one problem. We do not emit the mono_aot_module_ symbol in dylibs, just static libs.
Comment 1 Zoltan Varga 2017-02-16 05:50:14 UTC
We emit a 'mono_aot_file_info' symbol instead, you can use dlopen()+dlsym() to find it.
Comment 2 Chris Hamons 2017-02-16 14:28:44 UTC
@Zoltan - We tried mono_aot_file_info - See crash here - https://forums.xamarin.com/discussion/comment/253104/#Comment_253104
Comment 3 Zoltan Varga 2017-04-12 15:09:35 UTC
Try aot-ing the image using the 'static' option, i.e.:

mono --aot=static foo.dll

Note You need to log in before you can comment on or make changes to this bug.