From c235a59c5cddbdc86f679340f47c1586d434db2a Mon Sep 17 00:00:00 2001 From: Marcos Henrich Date: Fri, 20 May 2016 11:54:59 +0100 Subject: [PATCH] [corlib] Added icall Assembly.GetAotId --- mcs/class/corlib/System.Reflection/Assembly.cs | 3 +++ mono/metadata/icall-def.h | 1 + mono/metadata/icall.c | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/mcs/class/corlib/System.Reflection/Assembly.cs b/mcs/class/corlib/System.Reflection/Assembly.cs index f75802198eb..c90059d3a87 100644 --- a/mcs/class/corlib/System.Reflection/Assembly.cs +++ b/mcs/class/corlib/System.Reflection/Assembly.cs @@ -138,6 +138,9 @@ namespace System.Reflection { [MethodImplAttribute (MethodImplOptions.InternalCall)] private extern string InternalImageRuntimeVersion (); + [MethodImplAttribute (MethodImplOptions.InternalCall)] + static internal extern string GetAotId (); + // SECURITY: this should be the only caller to icall get_code_base private string GetCodeBase (bool escaped) { diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h index d6012ab5071..9da2c8308df 100644 --- a/mono/metadata/icall-def.h +++ b/mono/metadata/icall-def.h @@ -459,6 +459,7 @@ ICALL(OBJ_3, "MemberwiseClone", ves_icall_System_Object_MemberwiseClone) ICALL_TYPE(ASSEM, "System.Reflection.Assembly", ASSEM_1) ICALL(ASSEM_1, "FillName", ves_icall_System_Reflection_Assembly_FillName) +ICALL(ASSEM_1a, "GetAotId", ves_icall_System_Reflection_Assembly_GetAotId) ICALL(ASSEM_2, "GetCallingAssembly", ves_icall_System_Reflection_Assembly_GetCallingAssembly) ICALL(ASSEM_3, "GetEntryAssembly", ves_icall_System_Reflection_Assembly_GetEntryAssembly) ICALL(ASSEM_4, "GetExecutingAssembly", ves_icall_System_Reflection_Assembly_GetExecutingAssembly) diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c index c294eb0a49d..5a1acf229f7 100644 --- a/mono/metadata/icall.c +++ b/mono/metadata/icall.c @@ -4899,6 +4899,14 @@ ves_icall_System_Reflection_Assembly_GetManifestResourceNames (MonoReflectionAss return result; } +ICALL_EXPORT MonoString* +ves_icall_System_Reflection_Assembly_GetAotId () +{ + guint8* aotid = &mono_domain_get ()->entry_assembly->image->aotid; + + return mono_string_new (mono_domain_get (), mono_guid_to_string(aotid)); +} + static MonoObject* create_version (MonoDomain *domain, guint32 major, guint32 minor, guint32 build, guint32 revision, MonoError *error) { -- 2.25.1