Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRyan Lucia <rylucia@microsoft.com>2019-08-06 13:16:15 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-08-06 13:16:15 +0300
commit85296ef1be7bb34c1c92953ca66a026e5dcd0771 (patch)
tree01aba924c37ff79ff2f34f8d346f4e5392b2edeb /tools
parent474092add6c0c9f41ff3724485d3d05be48b4c5f (diff)
[netcore] Make the load hook ALC-aware (#16012)
The meat of this PR is what the title suggests, and with this commit all the basic ALC functionality should be working properly. Probably worth checking if this makes any new tests pass. Additionally, this PR includes a second commit that switches over the search hook to use loaded_assemblies from the ALCs. This may break some existing tests due to remaining unimplemented ALC behavior, notably the native loading mechanism needed for Openssl in some of the cryptography tests. My inclination is to include the commit regardless and just disable the failing tests so that any future ALC work can watch for regressions in the loader, but I would appreciate input from steveisok on how important those tests are. I've not disabled anything yet in order to see exactly what new failures are introduced.
Diffstat (limited to 'tools')
-rw-r--r--tools/pedump/pedump.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/pedump/pedump.c b/tools/pedump/pedump.c
index 5540a40841b..8414ae36e20 100644
--- a/tools/pedump/pedump.c
+++ b/tools/pedump/pedump.c
@@ -47,7 +47,7 @@ gboolean verify_partial_md = FALSE;
static char *assembly_directory[2];
static MonoAssembly *pedump_preload (MonoAssemblyName *aname, gchar **assemblies_path, gpointer user_data);
-static void pedump_assembly_load_hook (MonoAssembly *assembly, gpointer user_data);
+static void pedump_assembly_load_hook (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer user_data, MonoError *error);
static MonoAssembly *pedump_assembly_search_hook (MonoAssemblyLoadContext *alc, MonoAssembly *requesting, MonoAssemblyName *aname, gboolean refonly, gboolean postload, gpointer user_data, MonoError *error);
/* unused
@@ -467,7 +467,7 @@ verify_image_file (const char *fname)
mono_assembly_fill_assembly_name (image, &assembly->aname);
/*Finish initializing the runtime*/
- mono_install_assembly_load_hook (pedump_assembly_load_hook, NULL);
+ mono_install_assembly_load_hook_v2 (pedump_assembly_load_hook, NULL);
mono_install_assembly_search_hook_v2 (pedump_assembly_search_hook, NULL, FALSE, FALSE);
mono_init_version ("pedump", image->version);
@@ -478,7 +478,7 @@ verify_image_file (const char *fname)
mono_marshal_init ();
} else {
/*Finish initializing the runtime*/
- mono_install_assembly_load_hook (pedump_assembly_load_hook, NULL);
+ mono_install_assembly_load_hook_v2 (pedump_assembly_load_hook, NULL);
mono_install_assembly_search_hook_v2 (pedump_assembly_search_hook, NULL, FALSE, FALSE);
mono_init_version ("pedump", NULL);
@@ -646,7 +646,7 @@ pedump_preload (MonoAssemblyName *aname,
static GList *loaded_assemblies = NULL;
static void
-pedump_assembly_load_hook (MonoAssembly *assembly, gpointer user_data)
+pedump_assembly_load_hook (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer user_data, MonoError *error)
{
loaded_assemblies = g_list_prepend (loaded_assemblies, assembly);
}