Add LinkerDescriptor
authorMarek Safar <marek.safar@gmail.com>
Tue, 9 May 2017 15:50:58 +0000 (17:50 +0200)
committerMarek Safar <marek.safar@gmail.com>
Thu, 18 May 2017 08:07:38 +0000 (10:07 +0200)
mcs/class/corlib/LinkerDescriptor/mscorlib.xml [new file with mode: 0644]
mcs/class/corlib/Makefile

diff --git a/mcs/class/corlib/LinkerDescriptor/mscorlib.xml b/mcs/class/corlib/LinkerDescriptor/mscorlib.xml
new file mode 100644 (file)
index 0000000..19c995b
--- /dev/null
@@ -0,0 +1,852 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<linker>
+       <assembly fullname="mscorlib">
+       
+               <!-- domain.c: mono_defaults.appdomain_class -->
+               <type fullname="System.AppDomain" preserve="fields">
+                       <method name="DoDomainUnload" />
+                       <!-- appdomain.c: mono_domain_try_type_resolve -->
+                       <method name="DoTypeResolve" />
+                       <!-- appdomain.c: mono_try_assembly_resolve -->
+                       <method name="DoAssemblyResolve" />
+                       <!-- appdomain.c: mono_domain_fire_assembly_load -->
+                       <method name="DoAssemblyLoad" />
+                       <!-- appdomain.c: mono_domain_try_unload -->
+                       <method name="DoDomainUnload" />
+                       <!-- marshal.c: mono_remoting_marshal_init -->
+                       <method name="InternalSetContext" />
+                       <!-- System.Runtime.Remoting/RemotingServices.cs: GetDomainProxy(AppDomain domain) -->
+                       <method name="GetMarshalledDomainObjRef" feature="remoting" />
+               </type>
+
+               <!-- appdomain.c: mono_runtime_init -->
+               <type fullname="System.AppDomainSetup" preserve="fields" />
+               
+               <!-- exception.c: mono_get_exception_appdomain_unloaded (used in several places), threadpool.c -->
+               <type fullname="System.AppDomainUnloadedException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- marshal.c: emit_marshal_custom (should not be used on devices)
+               <type fullname="System.ApplicationException" />
+               -->
+
+               <!-- exception.c (mono_get_exception_argument) -->
+               <type fullname="System.ArgumentException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+                       <!-- MONO_OBJECT_SETREF -->
+                       <field name="param_name" />
+               </type>
+        
+               <!-- exception.c (mono_get_exception_argument_null) -->
+               <type fullname="System.ArgumentNullException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <!-- exception.c (mono_get_exception_argument_out_of_range) -->
+               <type fullname="System.ArgumentOutOfRangeException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+
+               <!-- exception.c (mono_get_exception_arithmetic) -->
+               <type fullname="System.ArithmeticException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.array_class -->
+               <type fullname="System.Array">
+                       <!-- InternalArray__%s_%s is used in aot-compiler.c -->
+                       <method name="InternalArray__ICollection_get_Count" />
+                       <method name="InternalArray__ICollection_get_IsReadOnly" />
+                       <method name="InternalArray__IEnumerable_GetEnumerator" />
+                       <method name="InternalArray__ICollection_Clear" />
+                       <method name="InternalArray__ICollection_Add" />
+                       <method name="InternalArray__ICollection_Remove" />
+                       <method name="InternalArray__ICollection_Contains" />
+                       <method name="InternalArray__ICollection_CopyTo" />
+                       <method name="InternalArray__Insert" />
+                       <method name="InternalArray__RemoveAt" />
+                       <method name="InternalArray__IndexOf" />
+                       <method name="InternalArray__get_Item" />
+                       <method name="InternalArray__set_Item" />
+                       <method name="InternalArray__IReadOnlyList_get_Item" />
+                       <method name="InternalArray__IReadOnlyCollection_get_Count" />
+               </type>
+               
+               <!-- mono/metadata/exception.c mono/metadata/marshal.c ... -->
+               <!-- exception.c (mono_get_exception_array_type_mismatch) -->
+               <type fullname="System.ArrayTypeMismatchException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.attribute_class -->
+               <!-- used in reflection.c to create array of attributes (no need to preserve everything beside the type itself) -->
+               <type fullname="System.Attribute" preserve="fields" />
+               
+               <!-- exception.c / mono-error.c -->
+               <type fullname="System.BadImageFormatException">
+                       <!-- mono_get_exception_bad_image_format / mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+                       <!-- mono_get_exception_bad_image_format2 / mono_exception_from_name_two_strings -->
+                       <method signature="System.Void .ctor(System.String,System.String)" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.boolean_class -->
+               <type fullname="System.Boolean" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.byte_class -->
+               <type fullname="System.Byte" preserve="fields" />
+               
+               <!-- exception.c" mono_get_exception_cannot_unload_appdomain (called by appdomain.c) -->
+               <type fullname="System.CannotUnloadAppDomainException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.char_class -->
+               <type fullname="System.Char" preserve="fields" />
+
+               <!-- marshal.c: emit_marshal_vtype -->
+               <type fullname="System.DateTime" preserve="fields" />
+               
+               <!-- reflection.c: mono_get_dbnull_object / comment: Used as the value for ParameterInfo.DefaultValue -->
+               <type fullname="System.DBNull" preserve="fields" />
+               <type fullname="System.Decimal" preserve="fields" />
+               <!-- domain.c: mono_defaults.delegate_class -->
+               <type fullname="System.Delegate" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.stack_frame_class -->
+               <!-- used in mini-exceptions.c to create array and MonoStackFrame instance, i.e. only fields are required to be preserved -->
+               <type fullname="System.Diagnostics.StackFrame" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.stack_trace_class -->
+               <!-- does not seems used outside the g_assert in domain.c (maybe it could be removed) -->
+               <type fullname="System.Diagnostics.StackTrace" preserve="fields" />
+
+               <!-- debugger-agent.c: create_event_list -->
+               <type fullname="System.Diagnostics.DebuggerNonUserCodeAttribute"/>
+               <type fullname="System.Diagnostics.DebuggerHiddenAttribute"/>
+               <type fullname="System.Diagnostics.DebuggerStepThroughAttribute"/>
+
+               <!-- exception.c (mono_get_exception_divide_by_zero) -->
+               <type fullname="System.DivideByZeroException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- loader.c: returned (as a string) from mono_lookup_pinvoke_call and used in
+                               icall.c: prelink_method / mono_exception_from_name_msg
+                               marshal.c: mono_delegate_to_ftnptr and mono_marshal_get_native_wrapper
+               -->
+               <type fullname="System.DllNotFoundException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.double_class -->
+               <type fullname="System.Double" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.enum_class -->
+               <type fullname="System.Enum" preserve="fields" />
+               
+               <!-- loader.c: returned (as a string) from mono_lookup_pinvoke_call and used in … -->
+               <type fullname="System.EntryPointNotFoundException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <type fullname="System.Environment">
+                       <!-- appdomain.c: mono_get_corlib_version -->
+                       <field name="mono_corlib_version" />
+                       <method name="get_StackTrace" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.exception_class and fields are defined in object-internals.h -->
+               <type fullname="System.Exception" preserve="fields">
+                       <!-- used in mini-exceptions.c (if trace is enabled) -->
+                       <method name="get_Message" />
+               </type>
+               
+               <!-- exception.c (mono_get_exception_execution_engine) -->
+               <type fullname="System.ExecutionEngineException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <type fullname="System.FieldAccessException">
+                       <!-- exception.c: mono_get_exception_field_access / mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+                       <!-- exception.c: mono_get_exception_field_access_msg / mono_exception_from_name_msg -->
+                       <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <type fullname="System.FormatException">
+                       <!-- icall.c (base64_to_byte_array) mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <!-- exception.c: mono_get_exception_index_out_of_range - used by many in icall.c and in socket-io.c -->
+               <type fullname="System.IndexOutOfRangeException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.int16_class -->
+               <type fullname="System.Int16" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.int32_class -->
+               <type fullname="System.Int32" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.int64_class -->
+               <type fullname="System.Int64" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.int_class -->
+               <type fullname="System.IntPtr" preserve="fields" />
+               
+               <!-- exception.c (mono_get_exception_invalid_cast) -->
+               <type fullname="System.InvalidCastException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- marshal.c: emit several times using mono_mb_emit_exception_full -->
+               <!-- exception.c (mono_get_exception_invalid_operation) -->
+               <type fullname="System.InvalidOperationException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <!-- mini.c: mono_jit_compile_method_inner (looks like one case is JITted, AOT too) -->
+               <type fullname="System.InvalidProgramException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <type fullname="System.MarshalByRefObject" preserve="fields" feature="remoting" />
+
+               <type fullname="System.MethodAccessException">
+                       <!-- exception.c: mono_get_exception_method_access / mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+                       <!-- exception.c: mono_get_exception_method_access_msg / mono_exception_from_name_msg -->
+                       <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <!-- mini.c (mono_jit_compiler_method_inner) / mono-error.c -->
+               <type fullname="System.MissingFieldException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+        
+               <type fullname="System.MissingMethodException">
+                       <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+                       <!-- exception.c (mono_get_exception_type_load) mono_exception_from_name_two_strings -->
+                       <method signature="System.Void .ctor(System.String,System.String)" />
+               </type>
+               
+               <!-- threadpool.c: mono_thread_pool_init (assert) -->
+               <type fullname="System.MonoAsyncCall" preserve="fields" />
+               <!-- mono-mlist.c (managed list): used in threadpool.c and gc.c -->
+               <type fullname="System.MonoListItem" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.type_class -->
+               <type fullname="System.MonoType" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.multicastdelegate_class -->
+               <type fullname="System.MulticastDelegate" preserve="fields" />
+               
+               <!-- exception.c (mono_get_exception_not_implemented) -->
+               <type fullname="System.NotImplementedException">
+                       <!-- mono_get_exception_not_implemented -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <!-- exception.c (mono_get_exception_not_supported) -->
+               <type fullname="System.NotSupportedException">
+                       <!-- mono_get_exception_not_implemented -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+        
+               <!-- appdomain.c (create_domain_objects) domain->null_reference_ex -->
+               <!-- exception.c (mono_get_exception_null_reference) -->
+               <type fullname="System.NullReferenceException">
+                       <!-- exception.c: mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+                       <!-- appdomain.c: mono_exception_from_name_two_strings (only one string in the signature since NULL is used as the 2nd parameter) -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.nullable_class -->         
+               <type fullname="System.Nullable`1" preserve="fields">
+                       <!-- method-to-ir.c (handle_box) -->
+                       <method name="Box" />
+                       <!-- method-to-ir.c (handle_unbox_nullable) -->
+                       <method name="Unbox" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.object_class -->
+               <type fullname="System.Object">
+                       <!-- class.c: initialize_object_slots -->
+                       <method name="Finalize" />
+                       <method name="GetHashCode" />
+                       <!-- needed for debugging -->
+                       <method name="obj_address" />
+                       <!-- TransparentProxy.cs, RemotingServices.cs -->
+                       <method name="FieldGetter" feature="remoting" />
+                       <method name="FieldSetter" feature="remoting" />
+               </type>
+               
+               <!-- appdomain.c (create_domain_objects) domain->out_of_memory_ex -->
+               <type fullname="System.OutOfMemoryException">
+                       <!-- mono_exception_from_name_two_strings (only one string in the signature since NULL is used as the 2nd parameter) -->
+                       <method signature="System.Void .ctor(System.String)" />
+                       <!-- exception.c: mono_get_exception_out_of_memory / mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- exception.c (mono_get_exception_overflow) -->
+               <type fullname="System.OverflowException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+
+               <!-- reflection.c: mono_get_reflection_missing_object -->
+               <type fullname="System.Reflection.Missing" preserve="field" />
+
+               <!-- domain.c: mono_defaults.argumenthandle_class -->           
+               <type fullname="System.RuntimeArgumentHandle" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.typefield_class -->
+               <type fullname="System.RuntimeFieldHandle" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.methodhandle_class -->
+               <type fullname="System.RuntimeMethodHandle" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.typehandle_class -->
+               <type fullname="System.RuntimeTypeHandle" preserve="fields" />
+               <!-- domain.c: mono_defaults.sbyte_class -->
+               <type fullname="System.SByte" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.single_class -->
+               <type fullname="System.Single" preserve="fields" />
+               
+               <!-- appdomain.c (create_domain_objects) domain->stack_overflow_ex -->
+               <type fullname="System.StackOverflowException">
+                       <!-- mono_exception_from_name_two_strings (only one string in the signature since NULL is used as the 2nd parameter) -->
+                       <method signature="System.Void .ctor(System.String)" />
+                       <!-- exception.c: mono_get_exception_stack_overflow / mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- object.c: mono_runtime_exec_main -->
+               <type fullname="System.STAThreadAttribute" />
+               
+               <!-- domain.c: mono_defaults.string_class -->
+               <type fullname="System.String" preserve="fields">
+                       <!-- marshal.c mono_marshal_get_native_wrapper -->
+                       <method name="CreateString" />
+                       <!-- method-to-ir.c: mini_redirect_call -->
+                       <method name="InternalAllocateStr" />
+                       <!-- method-to-it.c: mini_emit_initobj -->
+                       <method name="memset" />
+                       <!-- mini-generic-sharing.c: class_type_info 
+                               All patterns bellow
+                       -->
+                       <method name="bzero" />
+                       <method name="bzero_aligned_1" />
+                       <method name="bzero_aligned_2" />
+                       <method name="bzero_aligned_4" />
+                       <method name="bzero_aligned_8" />
+                       <method name="memcpy" />
+                       <method name="memcpy_aligned_1" />
+                       <method name="memcpy_aligned_2" />
+                       <method name="memcpy_aligned_4" />
+                       <method name="memcpy_aligned_8" />
+               </type>
+
+               <!-- socket-io.c: created/raised several time -->
+               <type fullname="System.SystemException">
+                       <!-- mono_exception_from_nameg -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.systemtype_class -->
+               <type fullname="System.Type" preserve="fields">
+                       <!-- marshal.c (mono_marshal_get_synchronized_wrapper) -->
+                       <method name="GetTypeFromHandle" />
+               </type>
+               
+               <!-- exception.c (mono_get_exception_type_initialization) -->
+               <type fullname="System.TypeInitializationException">
+                       <!-- iterates to find the (only) 2 paramaters .ctor -->
+                       <method signature="System.Void .ctor(System.String,System.Exception)" />
+               </type>
+
+               <!-- exception.c (mono_get_exception_type_load) -->
+               <type fullname="System.TypeLoadException">
+                       <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+                       <!-- mono_exception_from_name_two_strings -->
+                       <method signature="System.Void .ctor(System.String,System.String)" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.typed_reference_class -->          
+               <type fullname="System.TypedReference" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.uint16_class -->
+               <type fullname="System.UInt16" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.uint32_class -->
+               <type fullname="System.UInt32" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.uint64_class -->
+               <type fullname="System.UInt64" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.uint_class -->
+               <type fullname="System.UIntPtr" preserve="fields" />
+               
+               <!-- object.c: create_unhandled_exception_eventargs (assert) -->
+               <type fullname="System.UnhandledExceptionEventArgs">
+                       <method signature="System.Void .ctor(System.Object,System.Boolean)" />
+               </type>
+               
+               <!-- class.c: make_generic_param_class -->
+               <type fullname="System.ValueType" preserve="fields" />
+
+               <!-- comiterop.c -->
+               <type fullname="System.Variant" preserve="fields" feature="com">
+                       <method name="Clear" />
+               </type>
+
+               <!-- icall.c: create_version is used by
+                       * ves_icall_System_Reflection_Assembly_GetReferencedAssemblies
+                       * fill_reflection_assembly_name
+                               * ves_icall_System_Reflection_Assembly_FillName
+                               * ves_icall_System_Reflection_Assembly_InternalGetAssemblyName
+                               * ves_icall_System_Reflection_AssemblyName_ParseName
+                       -->
+               <type fullname="System.Version">
+                       <method signature="System.Void .ctor(System.Int32,System.Int32,System.Int32,System.Int32)" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.void_class -->
+               <type fullname="System.Void" preserve="fields" />
+
+               <!-- comiterop.c -->
+               <type fullname="System.__ComObject" feature="com" />
+
+               <!-- class.c: generic_array_methods -->
+               <type fullname="System.Collections.Generic.ICollection`1" />
+               <type fullname="System.Collections.Generic.IEnumerable`1" />
+               <type fullname="System.Collections.Generic.IReadOnlyList`1" />
+               <type fullname="System.Collections.Generic.IReadOnlyCollection`1" />
+               
+               <!-- domain.c: mono_defaults.generic_ilist_class -->
+               <type fullname="System.Collections.Generic.IList`1" />
+               
+               <!-- aot-compiler.c: add_generic_instances and add_generic_class_with_depth -->
+               <type fullname="System.Collections.Generic.GenericEqualityComparer`1">
+                       <method name=".ctor" />
+               </type>
+               
+               <!-- aot-compiler.c: add_generic_instances and add_generic_class_with_depth -->
+               <type fullname="System.Collections.Generic.GenericComparer`1">
+                       <method name=".ctor" />
+               </type>
+
+               <!-- icalls - but (at least parts of them) are used thru interfaces at runtime and cannot be linked out -->
+               <type fullname="System.Globalization.DateTimeFormatInfo" preserve="fields" />
+               <type fullname="System.Globalization.CompareInfo" preserve="fields" />
+               <type fullname="System.Globalization.CultureInfo" preserve="fields">
+                       <!-- icall.c: fill_reflection_assembly_name (assert) and ves_icall_System_Reflection_Assembly_GetReferencedAssemblies (assert) -->
+                       <method name="CreateCulture" />
+               </type>
+               <type fullname="System.Globalization.NumberFormatInfo" preserve="fields" />
+               <type fullname="System.Globalization.RegionInfo" preserve="fields" />
+               <type fullname="System.Globalization.SortKey" preserve="fields" />
+
+               <type fullname="System.IO.FileNotFoundException">
+                       <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+                       <!-- exception.c (mono_get_exception_file_not_found and mono_get_exception_file_not_found) -->
+                       <!-- mono_exception_from_name_two_strings -->
+                       <method signature="System.Void .ctor(System.String,System.String)" />
+               </type>
+
+               <!-- exception.c (mono_get_exception_io) -->
+               <type fullname="System.IO.IOException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <!-- fileio.h: shared structure between the managed and unmanaged worlds -->
+               <type fullname="System.IO.MonoIOStat" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.math_class
+                       method-to-ir.c: empty branch (wrt Min/Max optimization)
+                       mini-[x86|amd64].c needs the type but then only check for names
+                       note: there's no fields (static type) but that will mark the type itself -->
+               <type fullname="System.Math" preserve="fields" />
+
+               <type fullname="System.Reflection.MonoAssembly">
+                       <method name=".ctor" />
+               </type>
+               <type fullname="System.Reflection.MonoModule">
+                       <method name=".ctor" />
+               </type>
+
+               <!-- appdomain.c: ves_icall_System_AppDomain_GetAssemblies -->
+               <type fullname="System.Reflection.Assembly" preserve="fields">
+                       <method name="MonoDebugger_GetMethodToken" feature="sre" />
+                       <method name="GetNamespaces" feature="sre" />
+               </type>
+               <type fullname="System.Reflection.AssemblyName" preserve="fields" />
+               <type fullname="System.Reflection.ConstructorInfo" preserve="fields" />
+
+               <!-- domain.c: mono_defaults.customattribute_data_class -->
+               <type fullname="System.Reflection.CustomAttributeData" preserve="fields">
+                       <!-- custom-attrs.c: create_custom_attr_data - create an instance with the ctor using 4 arguments -->
+                       <method signature="System.Void .ctor(System.Reflection.ConstructorInfo,System.Reflection.Assembly,System.IntPtr,System.UInt32)" />
+               </type>
+
+               <!-- reflection.c: create_cattr_named_arg - create an instance with the ctor using 2 parameters -->
+               <type fullname="System.Reflection.CustomAttributeNamedArgument">
+                       <method signature="System.Void .ctor(System.Reflection.MemberInfo,System.Object)" />
+               </type>
+               
+               <!-- reflection.c: create_cattr_typed_arg - create an instance with the ctor using 2 parameters -->
+               <type fullname="System.Reflection.CustomAttributeTypedArgument">
+                       <method signature="System.Void .ctor(System.Type,System.Object)" />
+               </type>
+               <type fullname="System.Reflection.EventInfo" preserve="fields">
+                       <method name="AddEventFrame" />
+                       <method name="StaticAddEventAdapterFrame" />
+               </type>
+               
+               <!-- reflection.c: mono_method_body_get_object -->
+               <type fullname="System.Reflection.ExceptionHandlingClause" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.field_info_class -->
+               <type fullname="System.Reflection.FieldInfo" preserve="fields" />
+               
+               <!-- reflection.c: mono_method_body_get_object -->
+               <type fullname="System.Reflection.LocalVariableInfo" preserve="fields" />
+
+               <!-- reflection.c: mono_method_body_get_object -->
+               <type fullname="System.Reflection.MethodBody" preserve="fields" />
+               <!-- domain.c: mono_defaults.method_info_class -->
+               <type fullname="System.Reflection.MethodInfo" preserve="fields" />
+
+               <type fullname="System.Reflection.Module" preserve="fields" />
+               <type fullname="System.Reflection.MonoAssembly" preserve="fields" />
+               <type fullname="System.Reflection.MonoModule" preserve="fields" />
+               <type fullname="System.Reflection.MonoCMethod" preserve="fields" />
+               <type fullname="System.Reflection.MonoEvent" preserve="fields" />
+               <type fullname="System.Reflection.MonoEventInfo" preserve="fields" />
+               <type fullname="System.Reflection.MonoField" preserve="fields" />
+               
+               <!-- reflection.c: mono_method_get_object uses both MonoGeneric[C]Method / will crash for ves_icall_Type_GetConstructors_internal -->
+               <type fullname="System.Reflection.MonoGenericMethod" preserve="fields" />
+               <type fullname="System.Reflection.MonoGenericCMethod" preserve="fields" />
+               
+               <type fullname="System.Reflection.MonoMethod" preserve="fields" />
+               <type fullname="System.Reflection.MonoMethodInfo" preserve="fields" />
+               <type fullname="System.Reflection.MonoPropertyInfo" preserve="fields" />
+               
+               <type fullname="System.Reflection.MonoProperty" preserve="fields">
+                       <method name="GetterAdapterFrame" />
+                       <method name="StaticGetterAdapterFrame" />
+               </type>
+               <type fullname="System.Reflection.ParameterInfo" preserve="fields" />
+               <!-- reflection.c: ves_icall_get_parameter_info -->
+               <type fullname="System.Reflection.MonoParameterInfo" preserve="fields" />
+
+               <!-- object.c: mono_field_get_value_object and mono_runtime_invoke_array -->
+               <type fullname="System.Reflection.Pointer" >
+                       <method name="Box" />
+               </type>
+
+               <type fullname="System.Reflection.PropertyInfo" preserve="fields" />
+               
+               <!-- exception.c (mono_get_exception_reflection_type_load) -->
+               <type fullname="System.Reflection.ReflectionTypeLoadException">
+                       <method signature="System.Void .ctor(System.Type[],System.Exception[])" />
+               </type>
+
+               <!-- icall.c: ves_icall_InternalInvoke -->
+               <type fullname="System.Reflection.TargetException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+        
+               <!-- icall.c: ves_icall_InternalInvoke -->
+               <type fullname="System.Reflection.TargetParameterCountException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <type fullname="System.Reflection.Emit.AssemblyBuilder" preserve="fields" feature="sre">
+                       <method name="AddPermissionRequests" />
+                       <method name="AddModule" />
+                       <method name="DefineIconResource" />
+                       <method name="AddTypeForwarder" />
+                       <method name="EmbedResourceFile" />
+               </type>
+               <type fullname="System.Reflection.Emit.ConstructorBuilder" preserve="fields" feature="sre">
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.CustomAttributeBuilder" preserve="fields" feature="sre" />
+               <type fullname="System.Reflection.Emit.DynamicMethod" preserve="fields" />
+               <type fullname="System.Reflection.Emit.EnumBuilder" preserve="fields" />
+               <type fullname="System.Reflection.Emit.EventBuilder" preserve="fields" />
+               <type fullname="System.Reflection.Emit.FieldBuilder" preserve="fields" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.GenericTypeParameterBuilder" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.ILExceptionBlock" preserve="fields" feature="sre" />
+               <type fullname="System.Reflection.Emit.ILExceptionInfo" preserve="fields" />
+               <type fullname="System.Reflection.Emit.ILGenerator" preserve="fields">
+                       <method name="Mono_GetCurrentOffset" />
+               </type>
+               <type fullname="System.Reflection.Emit.LocalBuilder" preserve="fields" feature="sre" >
+                       <method name="Mono_GetLocalIndex" />
+               </type>
+               <type fullname="System.Reflection.Emit.MethodBuilder" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.ModuleBuilder" preserve="fields" feature="sre">
+                       <method name="Mono_GetGuid" />
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.MonoResource" preserve="fields" feature="sre" />
+               <type fullname="System.Reflection.Emit.MonoWin32Resource" preserve="fields" feature="sre" />
+               <type fullname="System.Reflection.Emit.ParameterBuilder" preserve="fields" feature="sre" />
+               <type fullname="System.Reflection.Emit.PropertyBuilder" preserve="fields" feature="sre" />
+               <type fullname="System.Reflection.Emit.SignatureHelper" preserve="fields" feature="sre" />
+               <type fullname="System.Reflection.Emit.TypeBuilder" preserve="fields" feature="sre">
+                       <method name="SetCharSet" />
+                       <!-- reflection.c mono_reflection_call_is_assignable_to () -->
+                       <method name="IsAssignableTo" />
+               </type>
+               <type fullname="System.Reflection.Emit.UnmanagedMarshal" preserve="fields" feature="sre" >
+                       <method name="DefineCustom" />
+                       <method name="DefineLPArrayInternal" />
+               </type>
+               <type fullname="System.Reflection.Emit.TypeBuilderInstantiation" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.ArrayType" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.ByRefType" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.PointerType" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.FieldOnTypeBuilderInst" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.MethodOnTypeBuilderInst" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+               <type fullname="System.Reflection.Emit.ConstructorOnTypeBuilderInst" preserve="fields" feature="sre" >
+                       <method name="RuntimeResolve" />
+               </type>
+
+               <!-- domain.c: mono_defaults.internals_visible_class -->
+               <type fullname="System.Runtime.CompilerServices.InternalsVisibleToAttribute" />
+
+               <!-- exception.c: mono_get_exception_runtime_wrapped () -->
+               <type fullname="System.Runtime.CompilerServices.RuntimeWrappedException">
+                       <method signature="System.Void .ctor(System.Object)" />
+               </type>
+
+               <!-- icall.c | object-internal.h: MonoReflectionDllImportAttribute structure -->
+               <type fullname="System.Runtime.InteropServices.DllImportAttribute" preserve="fields"/> 
+               <!-- marshal.c: emit_marshal_custom (DISABLE_JIT is not defined for the AOT compiler, only the ARM runtimes) -->
+               <type fullname="System.Runtime.InteropServices.ICustomMarshaler" />
+
+               <!-- domain.c: mono_defaults.marshal_class -->
+               <type fullname="System.Runtime.InteropServices.Marshal" preserve="fields" >
+                       <!-- marshal.c (mono_marshal_get_struct_to_ptr) -->
+                       <method name="StructureToPtr" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.safehandle_class -->
+               <type fullname="System.Runtime.InteropServices.SafeHandle" preserve="fields">
+                       <!-- marshal.c (init_safe_handle) -->
+                       <method name="DangerousAddRef" />
+                       <method name="DangerousRelease" />
+               </type>
+               
+               <!-- object-internals.h: defines MonoReflectionUnmanagedFunctionPointerAttribute, marshal.c: use it -->
+               <type fullname="System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute" preserve="fields"/>
+
+               <!-- marshal.c: mono_mb_emit_exception_marshal_directive -->
+               <type fullname="System.Runtime.InteropServices.MarshalDirectiveException">
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <!-- appdomain.c: mono_context_init -->
+               <!-- marshal.c: mono_remoting_marshal_init / removed with DISABLE_REMOTING -->
+               <type fullname="System.Runtime.Remoting.Contexts.Context" preserve="fields" feature="remoting" >
+                       <method name="get_NeedsContextSink" />
+               </type>
+
+               <!-- domain.c: mono_defaults.iremotingtypeinfo_class / removed with DISABLE_REMOTING -->
+               <type fullname="System.Runtime.Remoting.IRemotingTypeInfo" feature="remoting">
+                       <method name="CanCastTo" />
+               </type>
+
+               <!-- domain.c: mono_defaults.asyncresult_class (Stubify can't be applied on this type) -->
+               <!-- object.c MONO_OBJECT_SETREF in mono_async_result_new -->
+               <!-- threadpool.c: MONO_OBJECT_SETREF in create_simple_asyncresult -->
+               <type fullname="System.Runtime.Remoting.Messaging.AsyncResult" preserve="fields" />
+
+               <!-- marshal.c: mono_remoting_marshal_init / removed with DISABLE_REMOTING -->
+               <type fullname="System.Runtime.Remoting.Messaging.CallContext" feature="remoting" >
+                       <method name="SetCurrentCallContext" />
+               </type>
+               <type fullname="System.Runtime.Remoting.Messaging.MonoMethodMessage" preserve="fields" feature="remoting" >
+                       <method name="InitMessage" />
+               </type>
+               <type fullname="System.Runtime.Remoting.Proxies.RealProxy" preserve="fields" feature="remoting" >
+                       <method name="PrivateInvoke" />
+                       <method name="GetAppDomainTarget" />
+               </type>
+               <type fullname="System.Runtime.Remoting.Proxies.TransparentProxy" preserve="fields" feature="remoting" >
+                       <method name="LoadRemoteFieldNew" />
+                       <method name="StoreRemoteField" />
+               </type>
+               <type fullname="System.Runtime.Remoting.RemotingServices" feature="remoting" >
+                       <method name="SerializeCallData" />
+                       <method name="DeserializeCallData" />
+                       <method name="SerializeExceptionData" />
+               </type>
+
+               <!-- domain.c: mono_defaults.mono_method_message_class -->
+               <type fullname="System.Runtime.Remoting.Messaging.MonoMethodMessage" preserve="fields">
+                       <!-- object.c: mono_message_init -->
+                       <method name="InitMessage" />
+               </type>         
+
+               <!-- domain.c: mono_defaults.real_proxy_class / removed with DISABLE_REMOTING -->
+               <type fullname="System.Runtime.Remoting.Proxies.RealProxy" feature="remoting" />
+
+               <!-- domain.c: mono_defaults.transparent_proxy_class / removed with DISABLE_REMOTING -->
+               <type fullname="System.Runtime.Remoting.Proxies.TransparentProxy" feature="remoting" />
+
+               <!-- exception.c (mono_get_exception_serialization) -->
+               <type fullname="System.Runtime.Serialization.SerializationException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <!-- domain.c: mono_defaults.runtimesecurityframe_class -->             
+               <type fullname="System.Security.RuntimeSecurityFrame" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.executioncontext_class -->
+               <type fullname="System.Threading.ExecutionContext">
+                       <!-- security-manager.c: mono_get_context_capture_method (can likely be removed) -->
+                       <method name="Capture" />
+               </type>
+
+               <!-- aot-runtime.c: mono_aot_get_method -->
+               <type fullname="System.Threading.Interlocked">
+                       <method name="CompareExchange" />
+                       <method name="Exchange" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.monitor_class -->
+               <!-- monitor.c / method-to-ir.c: Enter and Exit are only string comparison (safe to link) -->
+               <type fullname="System.Threading.Monitor">
+                       <!-- marshal.c: mono_marshal_get_synchronized_wrapper-->
+                       <method name="Enter" />
+                       <method name="Exit" />
+               </type>
+
+               <!-- domain.c: mono_defaults.manualresetevent_class -->
+               <type fullname="System.Threading.ManualResetEvent" >
+                       <!-- runtime access fields and setter from inherited WaitHandle -->
+                       <method signature="System.Void .ctor(System.Boolean)" />
+               </type>
+
+               <!-- exception.c (mono_get_exception_synchronization_lock) -->
+               <type fullname="System.Threading.SynchronizationLockException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+
+               <!-- domain.c: mono_defaults.thread_class -->
+               <type fullname="System.Threading.Thread" preserve="fields">
+                       <method name="get_CurrentContext" />
+               </type>
+               
+               <!-- domain.c: mono_defaults.internal_thread_class -->
+               <type fullname="System.Threading.InternalThread" preserve="fields" />
+               
+               <!-- domain.c: mono_defaults.threadabortexception_class -->
+               <!-- exception.c (mono_get_exception_thread_abort) -->
+               <type fullname="System.Threading.ThreadAbortException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+               
+               <!-- exception.c (ThreadInterruptedException) -->
+               <type fullname="System.Threading.ThreadInterruptedException">
+                       <!-- mono_exception_from_name -->
+                       <method signature="System.Void .ctor()" />
+               </type>
+
+               <!-- exception.c (mono_get_exception_thread_abort) -->
+               <type fullname="System.Threading.ThreadStateException">
+                       <!-- mono_exception_from_name_msg -->
+                       <method signature="System.Void .ctor(System.String)" />
+               </type>
+               
+               <!-- object-internals.h: defines MonoWaitHandle, threadpool.c: gets the handle from the structure -->
+               <type fullname="System.Threading.WaitHandle" preserve="fields">
+                       <!-- object.c: mono_wait_handle_new -->
+                       <method name="set_Handle" />
+                       <!-- object.c: mono_wait_handle_get_handle -->
+                       <field name="safe_wait_handle" />
+               </type>
+
+               <!-- threadpool-ms.c (worker_thread) -->
+               <type fullname="System.Threading._ThreadPoolWaitCallback">
+                 <method name="PerformWaitCallback"/>
+               </type>
+
+               <!-- domain.c: mono_defaults.stringbuilder_class -->
+               <type fullname="System.Text.StringBuilder" preserve="fields" />
+
+               <!-- cominterop.c -->
+               <type fullname="Mono.Interop.ComInteropProxy" feature="com" />
+               <type fullname="Mono.Interop.IDispatch" feature="com" />
+               <type fullname="Mono.Interop.IUnknown" feature="com"/>
+
+               <!--
+               Many applications rely on Mono.Runtime to exist in order to detect
+               whether they are running on Mono or .NET. Thus we always preserve it
+               to allow such detection logic to work, even if the class is not used
+               directly.
+               -->
+               <type fullname="Mono.Runtime" />
+
+               <!-- marshal.c (mono_marshal_get_native_wrapper) -->
+               <type fullname="Mono.RuntimeStructs/HandleStackMark" />
+               <!-- marshal.c (mono_marshal_get_native_wrapper) -->
+               <type fullname="Mono.RuntimeStructs/MonoError" />
+       </assembly>
+</linker>
index ba8f3e4015ec7ea8b546a4e9e4c9a07616ef8f15..cdaa7c43828437071fa5fcfcca69ee591c8042d2 100644 (file)
@@ -41,7 +41,8 @@ RESOURCE_FILES = \
        resources/collation.cjkCHT.bin \
        resources/collation.cjkJA.bin \
        resources/collation.cjkKO.bin \
-       resources/collation.cjkKOlv2.bin
+       resources/collation.cjkKOlv2.bin \
+       LinkerDescriptor/mscorlib.xml
 
 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT,HAS_CORLIB_CONTRACTS