[mini] Move mono_install_load_aot_data_hook to a public header
authorAleksey Kliger <alklig@microsoft.com>
Wed, 18 Mar 2020 20:30:33 +0000 (16:30 -0400)
committerAleksey Kliger <aleksey@lambdageek.org>
Tue, 24 Mar 2020 01:10:19 +0000 (21:10 -0400)
It's already a MONO_API and it is used, for example, by Xamarin.iOS, but it
wasn't in a public header.

Mark it external only.  There are no uses of it inside the runtiem

src/mono/mono/mini/aot-runtime.h
src/mono/mono/mini/jit.h

index cd399c0..292c759 100644 (file)
@@ -273,16 +273,6 @@ gboolean mono_aot_init_llvmonly_method      (gpointer amodule, guint32 method_in
 GHashTable *mono_aot_get_weak_field_indexes (MonoImage *image);
 MonoAotMethodFlags mono_aot_get_method_flags (guint8 *code);
 
-/* These are used to load the AOT data for aot images compiled with MONO_AOT_FILE_FLAG_SEPARATE_DATA */
-/*
- * Return the AOT data for ASSEMBLY. SIZE is the size of the data. OUT_HANDLE should be set to a handle which is later
- * passed to the free function.
- */
-typedef unsigned char* (*MonoLoadAotDataFunc)          (MonoAssembly *assembly, int size, gpointer user_data, void **out_handle);
-/* Not yet used */
-typedef void  (*MonoFreeAotDataFunc)          (MonoAssembly *assembly, int size, gpointer user_data, void *handle);
-MONO_API void mono_install_load_aot_data_hook (MonoLoadAotDataFunc load_func, MonoFreeAotDataFunc free_func, gpointer user_data);
-
 #ifdef MONO_ARCH_CODE_EXEC_ONLY
 typedef guint32 (*MonoAotResolvePltInfoOffset)(gpointer amodule, guint32 plt_entry_index);
 #endif
index 9fc6a18..73f2bd8 100644 (file)
@@ -109,10 +109,20 @@ mono_set_use_llvm (mono_bool use_llvm);
 MONO_API MONO_RT_EXTERNAL_ONLY void
 mono_aot_register_module (void **aot_info);
 
+/* These are used to load the AOT data for aot images compiled with MONO_AOT_FILE_FLAG_SEPARATE_DATA */
+/*
+ * Return the AOT data for ASSEMBLY. SIZE is the size of the data. OUT_HANDLE should be set to a handle which is later
+ * passed to the free function.
+ */
+typedef unsigned char* (*MonoLoadAotDataFunc)          (MonoAssembly *assembly, int size, void* user_data, void **out_handle);
+/* Not yet used */
+typedef void  (*MonoFreeAotDataFunc)          (MonoAssembly *assembly, int size, void* user_data, void *handle);
+MONO_API MONO_RT_EXTERNAL_ONLY void
+mono_install_load_aot_data_hook (MonoLoadAotDataFunc load_func, MonoFreeAotDataFunc free_func, void* user_data);
+
 MONO_API MONO_RT_EXTERNAL_ONLY
 MonoDomain* mono_jit_thread_attach (MonoDomain *domain);
 
-
 MONO_END_DECLS
 
 #endif