[netcore] Remove unused InternalLoadUnmanagedDllFromPath
authorRyan Lucia <rylucia@microsoft.com>
Wed, 9 Oct 2019 17:37:35 +0000 (13:37 -0400)
committerRyan Lucia <ryan@luciaonline.net>
Mon, 14 Oct 2019 16:51:29 +0000 (12:51 -0400)
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
src/mono/mono/metadata/icall-def-netcore.h
src/mono/netcore/System.Private.CoreLib/src/System.Runtime.Loader/AssemblyLoadContext.cs

index 1370de2..25e4e44 100644 (file)
@@ -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)
 {
index 0a8b601..a292f96 100644 (file)
@@ -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))
index 98e4f2c..61143c6 100644 (file)
@@ -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)
                {