From 95eae2c38268dc5ec4eefc0c9c92f9a23cbe060e Mon Sep 17 00:00:00 2001 From: Ryan Lucia Date: Wed, 9 Oct 2019 13:37:35 -0400 Subject: [PATCH] [netcore] Remove unused InternalLoadUnmanagedDllFromPath As of https://github.com/dotnet/coreclr/pull/27090 Commit migrated from https://github.com/mono/mono/commit/80db55591af3bc85f3f2d0735c316b9b08350a79 --- src/mono/mono/metadata/assembly-load-context.c | 31 ---------------------- src/mono/mono/metadata/icall-def-netcore.h | 1 - .../System.Runtime.Loader/AssemblyLoadContext.cs | 3 --- 3 files changed, 35 deletions(-) diff --git a/src/mono/mono/metadata/assembly-load-context.c b/src/mono/mono/metadata/assembly-load-context.c index 1370de2..25e4e44 100644 --- a/src/mono/mono/metadata/assembly-load-context.c +++ b/src/mono/mono/metadata/assembly-load-context.c @@ -106,37 +106,6 @@ ves_icall_System_Runtime_Loader_AssemblyLoadContext_GetLoadContextForAssembly (M return GUINT_TO_POINTER (alc->gchandle); } -gpointer -ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalLoadUnmanagedDllFromPath (MonoStringHandle fname, MonoError *error) -{ - gpointer res = NULL; - MonoDl *lib = NULL; - char *filename = NULL; - char *local_error = NULL; - - g_assert (!MONO_HANDLE_IS_NULL (fname)); // should have already been checked in managed, so we assert - - filename = mono_string_handle_to_utf8 (fname, error); - goto_if_nok (error, exit); - - g_assert (g_path_is_absolute (filename)); // again, checked in managed - - lib = mono_dl_open (filename, MONO_DL_LAZY, &local_error); - - if (lib == NULL) { - mono_error_set_file_not_found (error, filename, "%s", local_error); - goto exit; - } - - res = lib->handle; - -exit: - g_free (lib); - g_free (filename); - g_free (local_error); - return res; -} - gboolean mono_alc_is_default (MonoAssemblyLoadContext *alc) { diff --git a/src/mono/mono/metadata/icall-def-netcore.h b/src/mono/mono/metadata/icall-def-netcore.h index 0a8b601..a292f96c 100644 --- a/src/mono/mono/metadata/icall-def-netcore.h +++ b/src/mono/mono/metadata/icall-def-netcore.h @@ -375,7 +375,6 @@ HANDLES(ALC_4, "InternalGetLoadedAssemblies", ves_icall_System_Runtime_Loader_As HANDLES(ALC_2, "InternalInitializeNativeALC", ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalInitializeNativeALC, gpointer, 3, (gpointer, MonoBoolean, MonoBoolean)) HANDLES(ALC_1, "InternalLoadFile", ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalLoadFile, MonoReflectionAssembly, 3, (gpointer, MonoString, MonoStackCrawlMark_ptr)) HANDLES(ALC_3, "InternalLoadFromStream", ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalLoadFromStream, MonoReflectionAssembly, 5, (gpointer, gpointer, gint32, gpointer, gint32)) -HANDLES(ALC_6, "InternalLoadUnmanagedDllFromPath", ves_icall_System_Runtime_Loader_AssemblyLoadContext_InternalLoadUnmanagedDllFromPath, gpointer, 1, (MonoString)) ICALL_TYPE(RUNIMPORT, "System.Runtime.RuntimeImports", RUNIMPORT_1) NOHANDLES(ICALL(RUNIMPORT_1, "RhBulkMoveWithWriteBarrier", ves_icall_System_Runtime_RuntimeImports_RhBulkMoveWithWriteBarrier)) diff --git a/src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs b/src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs index 98e4f2c..61143c6 100644 --- a/src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs +++ b/src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs @@ -27,9 +27,6 @@ namespace System.Runtime.Loader { } - [MethodImplAttribute (MethodImplOptions.InternalCall)] - extern static IntPtr InternalLoadUnmanagedDllFromPath (string unmanagedDllPath); - [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod Assembly InternalLoadFromPath (string assemblyPath, string nativeImagePath) { -- 2.7.4