19c995bc61a46795301791e790f96cc23f95ea3d
[mono.git] / mcs / class / corlib / LinkerDescriptor / mscorlib.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <linker>
3         <assembly fullname="mscorlib">
4         
5                 <!-- domain.c: mono_defaults.appdomain_class -->
6                 <type fullname="System.AppDomain" preserve="fields">
7                         <method name="DoDomainUnload" />
8                         <!-- appdomain.c: mono_domain_try_type_resolve -->
9                         <method name="DoTypeResolve" />
10                         <!-- appdomain.c: mono_try_assembly_resolve -->
11                         <method name="DoAssemblyResolve" />
12                         <!-- appdomain.c: mono_domain_fire_assembly_load -->
13                         <method name="DoAssemblyLoad" />
14                         <!-- appdomain.c: mono_domain_try_unload -->
15                         <method name="DoDomainUnload" />
16                         <!-- marshal.c: mono_remoting_marshal_init -->
17                         <method name="InternalSetContext" />
18                         <!-- System.Runtime.Remoting/RemotingServices.cs: GetDomainProxy(AppDomain domain) -->
19                         <method name="GetMarshalledDomainObjRef" feature="remoting" />
20                 </type>
21
22                 <!-- appdomain.c: mono_runtime_init -->
23                 <type fullname="System.AppDomainSetup" preserve="fields" />
24                 
25                 <!-- exception.c: mono_get_exception_appdomain_unloaded (used in several places), threadpool.c -->
26                 <type fullname="System.AppDomainUnloadedException">
27                         <!-- mono_exception_from_name -->
28                         <method signature="System.Void .ctor()" />
29                 </type>
30                 
31                 <!-- marshal.c: emit_marshal_custom (should not be used on devices)
32                 <type fullname="System.ApplicationException" />
33                 -->
34
35                 <!-- exception.c (mono_get_exception_argument) -->
36                 <type fullname="System.ArgumentException">
37                         <!-- mono_exception_from_name -->
38                         <method signature="System.Void .ctor()" />
39                         <!-- MONO_OBJECT_SETREF -->
40                         <field name="param_name" />
41                 </type>
42         
43                 <!-- exception.c (mono_get_exception_argument_null) -->
44                 <type fullname="System.ArgumentNullException">
45                         <!-- mono_exception_from_name_msg -->
46                         <method signature="System.Void .ctor(System.String)" />
47                 </type>
48
49                 <!-- exception.c (mono_get_exception_argument_out_of_range) -->
50                 <type fullname="System.ArgumentOutOfRangeException">
51                         <!-- mono_exception_from_name -->
52                         <method signature="System.Void .ctor()" />
53                 </type>
54
55                 <!-- exception.c (mono_get_exception_arithmetic) -->
56                 <type fullname="System.ArithmeticException">
57                         <!-- mono_exception_from_name -->
58                         <method signature="System.Void .ctor()" />
59                 </type>
60                 
61                 <!-- domain.c: mono_defaults.array_class -->
62                 <type fullname="System.Array">
63                         <!-- InternalArray__%s_%s is used in aot-compiler.c -->
64                         <method name="InternalArray__ICollection_get_Count" />
65                         <method name="InternalArray__ICollection_get_IsReadOnly" />
66                         <method name="InternalArray__IEnumerable_GetEnumerator" />
67                         <method name="InternalArray__ICollection_Clear" />
68                         <method name="InternalArray__ICollection_Add" />
69                         <method name="InternalArray__ICollection_Remove" />
70                         <method name="InternalArray__ICollection_Contains" />
71                         <method name="InternalArray__ICollection_CopyTo" />
72                         <method name="InternalArray__Insert" />
73                         <method name="InternalArray__RemoveAt" />
74                         <method name="InternalArray__IndexOf" />
75                         <method name="InternalArray__get_Item" />
76                         <method name="InternalArray__set_Item" />
77                         <method name="InternalArray__IReadOnlyList_get_Item" />
78                         <method name="InternalArray__IReadOnlyCollection_get_Count" />
79                 </type>
80                 
81                 <!-- mono/metadata/exception.c mono/metadata/marshal.c ... -->
82                 <!-- exception.c (mono_get_exception_array_type_mismatch) -->
83                 <type fullname="System.ArrayTypeMismatchException">
84                         <!-- mono_exception_from_name -->
85                         <method signature="System.Void .ctor()" />
86                 </type>
87                 
88                 <!-- domain.c: mono_defaults.attribute_class -->
89                 <!-- used in reflection.c to create array of attributes (no need to preserve everything beside the type itself) -->
90                 <type fullname="System.Attribute" preserve="fields" />
91                 
92                 <!-- exception.c / mono-error.c -->
93                 <type fullname="System.BadImageFormatException">
94                         <!-- mono_get_exception_bad_image_format / mono_exception_from_name_msg -->
95                         <method signature="System.Void .ctor(System.String)" />
96                         <!-- mono_get_exception_bad_image_format2 / mono_exception_from_name_two_strings -->
97                         <method signature="System.Void .ctor(System.String,System.String)" />
98                 </type>
99                 
100                 <!-- domain.c: mono_defaults.boolean_class -->
101                 <type fullname="System.Boolean" preserve="fields" />
102                 
103                 <!-- domain.c: mono_defaults.byte_class -->
104                 <type fullname="System.Byte" preserve="fields" />
105                 
106                 <!-- exception.c" mono_get_exception_cannot_unload_appdomain (called by appdomain.c) -->
107                 <type fullname="System.CannotUnloadAppDomainException">
108                         <!-- mono_exception_from_name_msg -->
109                         <method signature="System.Void .ctor(System.String)" />
110                 </type>
111                 
112                 <!-- domain.c: mono_defaults.char_class -->
113                 <type fullname="System.Char" preserve="fields" />
114
115                 <!-- marshal.c: emit_marshal_vtype -->
116                 <type fullname="System.DateTime" preserve="fields" />
117                 
118                 <!-- reflection.c: mono_get_dbnull_object / comment: Used as the value for ParameterInfo.DefaultValue -->
119                 <type fullname="System.DBNull" preserve="fields" />
120                 <type fullname="System.Decimal" preserve="fields" />
121                 <!-- domain.c: mono_defaults.delegate_class -->
122                 <type fullname="System.Delegate" preserve="fields" />
123                 
124                 <!-- domain.c: mono_defaults.stack_frame_class -->
125                 <!-- used in mini-exceptions.c to create array and MonoStackFrame instance, i.e. only fields are required to be preserved -->
126                 <type fullname="System.Diagnostics.StackFrame" preserve="fields" />
127                 
128                 <!-- domain.c: mono_defaults.stack_trace_class -->
129                 <!-- does not seems used outside the g_assert in domain.c (maybe it could be removed) -->
130                 <type fullname="System.Diagnostics.StackTrace" preserve="fields" />
131
132                 <!-- debugger-agent.c: create_event_list -->
133                 <type fullname="System.Diagnostics.DebuggerNonUserCodeAttribute"/>
134                 <type fullname="System.Diagnostics.DebuggerHiddenAttribute"/>
135                 <type fullname="System.Diagnostics.DebuggerStepThroughAttribute"/>
136
137                 <!-- exception.c (mono_get_exception_divide_by_zero) -->
138                 <type fullname="System.DivideByZeroException">
139                         <!-- mono_exception_from_name -->
140                         <method signature="System.Void .ctor()" />
141                 </type>
142                 
143                 <!-- loader.c: returned (as a string) from mono_lookup_pinvoke_call and used in
144                                 icall.c: prelink_method / mono_exception_from_name_msg
145                                 marshal.c: mono_delegate_to_ftnptr and mono_marshal_get_native_wrapper
146                 -->
147                 <type fullname="System.DllNotFoundException">
148                         <!-- mono_exception_from_name_msg -->
149                         <method signature="System.Void .ctor(System.String)" />
150                 </type>
151                 
152                 <!-- domain.c: mono_defaults.double_class -->
153                 <type fullname="System.Double" preserve="fields" />
154                 
155                 <!-- domain.c: mono_defaults.enum_class -->
156                 <type fullname="System.Enum" preserve="fields" />
157                 
158                 <!-- loader.c: returned (as a string) from mono_lookup_pinvoke_call and used in … -->
159                 <type fullname="System.EntryPointNotFoundException">
160                         <!-- mono_exception_from_name_msg -->
161                         <method signature="System.Void .ctor(System.String)" />
162                 </type>
163                 
164                 <type fullname="System.Environment">
165                         <!-- appdomain.c: mono_get_corlib_version -->
166                         <field name="mono_corlib_version" />
167                         <method name="get_StackTrace" />
168                 </type>
169                 
170                 <!-- domain.c: mono_defaults.exception_class and fields are defined in object-internals.h -->
171                 <type fullname="System.Exception" preserve="fields">
172                         <!-- used in mini-exceptions.c (if trace is enabled) -->
173                         <method name="get_Message" />
174                 </type>
175                 
176                 <!-- exception.c (mono_get_exception_execution_engine) -->
177                 <type fullname="System.ExecutionEngineException">
178                         <!-- mono_exception_from_name_msg -->
179                         <method signature="System.Void .ctor(System.String)" />
180                 </type>
181
182                 <type fullname="System.FieldAccessException">
183                         <!-- exception.c: mono_get_exception_field_access / mono_exception_from_name -->
184                         <method signature="System.Void .ctor()" />
185                         <!-- exception.c: mono_get_exception_field_access_msg / mono_exception_from_name_msg -->
186                         <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
187                         <method signature="System.Void .ctor(System.String)" />
188                 </type>
189
190                 <type fullname="System.FormatException">
191                         <!-- icall.c (base64_to_byte_array) mono_exception_from_name_msg -->
192                         <method signature="System.Void .ctor(System.String)" />
193                 </type>
194                 
195                 <!-- exception.c: mono_get_exception_index_out_of_range - used by many in icall.c and in socket-io.c -->
196                 <type fullname="System.IndexOutOfRangeException">
197                         <!-- mono_exception_from_name_msg -->
198                         <method signature="System.Void .ctor(System.String)" />
199                 </type>
200                 
201                 <!-- domain.c: mono_defaults.int16_class -->
202                 <type fullname="System.Int16" preserve="fields" />
203                 
204                 <!-- domain.c: mono_defaults.int32_class -->
205                 <type fullname="System.Int32" preserve="fields" />
206                 
207                 <!-- domain.c: mono_defaults.int64_class -->
208                 <type fullname="System.Int64" preserve="fields" />
209                 
210                 <!-- domain.c: mono_defaults.int_class -->
211                 <type fullname="System.IntPtr" preserve="fields" />
212                 
213                 <!-- exception.c (mono_get_exception_invalid_cast) -->
214                 <type fullname="System.InvalidCastException">
215                         <!-- mono_exception_from_name -->
216                         <method signature="System.Void .ctor()" />
217                 </type>
218                 
219                 <!-- marshal.c: emit several times using mono_mb_emit_exception_full -->
220                 <!-- exception.c (mono_get_exception_invalid_operation) -->
221                 <type fullname="System.InvalidOperationException">
222                         <!-- mono_exception_from_name_msg -->
223                         <method signature="System.Void .ctor(System.String)" />
224                 </type>
225                 
226                 <!-- mini.c: mono_jit_compile_method_inner (looks like one case is JITted, AOT too) -->
227                 <type fullname="System.InvalidProgramException">
228                         <!-- mono_exception_from_name_msg -->
229                         <method signature="System.Void .ctor(System.String)" />
230                 </type>
231
232                 <type fullname="System.MarshalByRefObject" preserve="fields" feature="remoting" />
233
234                 <type fullname="System.MethodAccessException">
235                         <!-- exception.c: mono_get_exception_method_access / mono_exception_from_name -->
236                         <method signature="System.Void .ctor()" />
237                         <!-- exception.c: mono_get_exception_method_access_msg / mono_exception_from_name_msg -->
238                         <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
239                         <method signature="System.Void .ctor(System.String)" />
240                 </type>
241                 
242                 <!-- mini.c (mono_jit_compiler_method_inner) / mono-error.c -->
243                 <type fullname="System.MissingFieldException">
244                         <!-- mono_exception_from_name_msg -->
245                         <method signature="System.Void .ctor(System.String)" />
246                 </type>
247         
248                 <type fullname="System.MissingMethodException">
249                         <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
250                         <method signature="System.Void .ctor(System.String)" />
251                         <!-- exception.c (mono_get_exception_type_load) mono_exception_from_name_two_strings -->
252                         <method signature="System.Void .ctor(System.String,System.String)" />
253                 </type>
254                 
255                 <!-- threadpool.c: mono_thread_pool_init (assert) -->
256                 <type fullname="System.MonoAsyncCall" preserve="fields" />
257                 <!-- mono-mlist.c (managed list): used in threadpool.c and gc.c -->
258                 <type fullname="System.MonoListItem" preserve="fields" />
259                 
260                 <!-- domain.c: mono_defaults.type_class -->
261                 <type fullname="System.MonoType" preserve="fields" />
262                 
263                 <!-- domain.c: mono_defaults.multicastdelegate_class -->
264                 <type fullname="System.MulticastDelegate" preserve="fields" />
265                 
266                 <!-- exception.c (mono_get_exception_not_implemented) -->
267                 <type fullname="System.NotImplementedException">
268                         <!-- mono_get_exception_not_implemented -->
269                         <method signature="System.Void .ctor(System.String)" />
270                 </type>
271
272                 <!-- exception.c (mono_get_exception_not_supported) -->
273                 <type fullname="System.NotSupportedException">
274                         <!-- mono_get_exception_not_implemented -->
275                         <method signature="System.Void .ctor(System.String)" />
276                 </type>
277         
278                 <!-- appdomain.c (create_domain_objects) domain->null_reference_ex -->
279                 <!-- exception.c (mono_get_exception_null_reference) -->
280                 <type fullname="System.NullReferenceException">
281                         <!-- exception.c: mono_exception_from_name -->
282                         <method signature="System.Void .ctor()" />
283                         <!-- appdomain.c: mono_exception_from_name_two_strings (only one string in the signature since NULL is used as the 2nd parameter) -->
284                         <method signature="System.Void .ctor(System.String)" />
285                 </type>
286                 
287                 <!-- domain.c: mono_defaults.nullable_class -->         
288                 <type fullname="System.Nullable`1" preserve="fields">
289                         <!-- method-to-ir.c (handle_box) -->
290                         <method name="Box" />
291                         <!-- method-to-ir.c (handle_unbox_nullable) -->
292                         <method name="Unbox" />
293                 </type>
294                 
295                 <!-- domain.c: mono_defaults.object_class -->
296                 <type fullname="System.Object">
297                         <!-- class.c: initialize_object_slots -->
298                         <method name="Finalize" />
299                         <method name="GetHashCode" />
300                         <!-- needed for debugging -->
301                         <method name="obj_address" />
302                         <!-- TransparentProxy.cs, RemotingServices.cs -->
303                         <method name="FieldGetter" feature="remoting" />
304                         <method name="FieldSetter" feature="remoting" />
305                 </type>
306                 
307                 <!-- appdomain.c (create_domain_objects) domain->out_of_memory_ex -->
308                 <type fullname="System.OutOfMemoryException">
309                         <!-- mono_exception_from_name_two_strings (only one string in the signature since NULL is used as the 2nd parameter) -->
310                         <method signature="System.Void .ctor(System.String)" />
311                         <!-- exception.c: mono_get_exception_out_of_memory / mono_exception_from_name -->
312                         <method signature="System.Void .ctor()" />
313                 </type>
314                 
315                 <!-- exception.c (mono_get_exception_overflow) -->
316                 <type fullname="System.OverflowException">
317                         <!-- mono_exception_from_name -->
318                         <method signature="System.Void .ctor()" />
319                 </type>
320
321                 <!-- reflection.c: mono_get_reflection_missing_object -->
322                 <type fullname="System.Reflection.Missing" preserve="field" />
323
324                 <!-- domain.c: mono_defaults.argumenthandle_class -->           
325                 <type fullname="System.RuntimeArgumentHandle" preserve="fields" />
326                 
327                 <!-- domain.c: mono_defaults.typefield_class -->
328                 <type fullname="System.RuntimeFieldHandle" preserve="fields" />
329                 
330                 <!-- domain.c: mono_defaults.methodhandle_class -->
331                 <type fullname="System.RuntimeMethodHandle" preserve="fields" />
332                 
333                 <!-- domain.c: mono_defaults.typehandle_class -->
334                 <type fullname="System.RuntimeTypeHandle" preserve="fields" />
335                 <!-- domain.c: mono_defaults.sbyte_class -->
336                 <type fullname="System.SByte" preserve="fields" />
337                 
338                 <!-- domain.c: mono_defaults.single_class -->
339                 <type fullname="System.Single" preserve="fields" />
340                 
341                 <!-- appdomain.c (create_domain_objects) domain->stack_overflow_ex -->
342                 <type fullname="System.StackOverflowException">
343                         <!-- mono_exception_from_name_two_strings (only one string in the signature since NULL is used as the 2nd parameter) -->
344                         <method signature="System.Void .ctor(System.String)" />
345                         <!-- exception.c: mono_get_exception_stack_overflow / mono_exception_from_name -->
346                         <method signature="System.Void .ctor()" />
347                 </type>
348                 
349                 <!-- object.c: mono_runtime_exec_main -->
350                 <type fullname="System.STAThreadAttribute" />
351                 
352                 <!-- domain.c: mono_defaults.string_class -->
353                 <type fullname="System.String" preserve="fields">
354                         <!-- marshal.c mono_marshal_get_native_wrapper -->
355                         <method name="CreateString" />
356                         <!-- method-to-ir.c: mini_redirect_call -->
357                         <method name="InternalAllocateStr" />
358                         <!-- method-to-it.c: mini_emit_initobj -->
359                         <method name="memset" />
360                         <!-- mini-generic-sharing.c: class_type_info 
361                                 All patterns bellow
362                         -->
363                         <method name="bzero" />
364                         <method name="bzero_aligned_1" />
365                         <method name="bzero_aligned_2" />
366                         <method name="bzero_aligned_4" />
367                         <method name="bzero_aligned_8" />
368                         <method name="memcpy" />
369                         <method name="memcpy_aligned_1" />
370                         <method name="memcpy_aligned_2" />
371                         <method name="memcpy_aligned_4" />
372                         <method name="memcpy_aligned_8" />
373                 </type>
374
375                 <!-- socket-io.c: created/raised several time -->
376                 <type fullname="System.SystemException">
377                         <!-- mono_exception_from_nameg -->
378                         <method signature="System.Void .ctor()" />
379                 </type>
380                 
381                 <!-- domain.c: mono_defaults.systemtype_class -->
382                 <type fullname="System.Type" preserve="fields">
383                         <!-- marshal.c (mono_marshal_get_synchronized_wrapper) -->
384                         <method name="GetTypeFromHandle" />
385                 </type>
386                 
387                 <!-- exception.c (mono_get_exception_type_initialization) -->
388                 <type fullname="System.TypeInitializationException">
389                         <!-- iterates to find the (only) 2 paramaters .ctor -->
390                         <method signature="System.Void .ctor(System.String,System.Exception)" />
391                 </type>
392
393                 <!-- exception.c (mono_get_exception_type_load) -->
394                 <type fullname="System.TypeLoadException">
395                         <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
396                         <method signature="System.Void .ctor(System.String)" />
397                         <!-- mono_exception_from_name_two_strings -->
398                         <method signature="System.Void .ctor(System.String,System.String)" />
399                 </type>
400                 
401                 <!-- domain.c: mono_defaults.typed_reference_class -->          
402                 <type fullname="System.TypedReference" preserve="fields" />
403                 
404                 <!-- domain.c: mono_defaults.uint16_class -->
405                 <type fullname="System.UInt16" preserve="fields" />
406                 
407                 <!-- domain.c: mono_defaults.uint32_class -->
408                 <type fullname="System.UInt32" preserve="fields" />
409                 
410                 <!-- domain.c: mono_defaults.uint64_class -->
411                 <type fullname="System.UInt64" preserve="fields" />
412                 
413                 <!-- domain.c: mono_defaults.uint_class -->
414                 <type fullname="System.UIntPtr" preserve="fields" />
415                 
416                 <!-- object.c: create_unhandled_exception_eventargs (assert) -->
417                 <type fullname="System.UnhandledExceptionEventArgs">
418                         <method signature="System.Void .ctor(System.Object,System.Boolean)" />
419                 </type>
420                 
421                 <!-- class.c: make_generic_param_class -->
422                 <type fullname="System.ValueType" preserve="fields" />
423
424                 <!-- comiterop.c -->
425                 <type fullname="System.Variant" preserve="fields" feature="com">
426                         <method name="Clear" />
427                 </type>
428
429                 <!-- icall.c: create_version is used by
430                         * ves_icall_System_Reflection_Assembly_GetReferencedAssemblies
431                         * fill_reflection_assembly_name
432                                 * ves_icall_System_Reflection_Assembly_FillName
433                                 * ves_icall_System_Reflection_Assembly_InternalGetAssemblyName
434                                 * ves_icall_System_Reflection_AssemblyName_ParseName
435                         -->
436                 <type fullname="System.Version">
437                         <method signature="System.Void .ctor(System.Int32,System.Int32,System.Int32,System.Int32)" />
438                 </type>
439                 
440                 <!-- domain.c: mono_defaults.void_class -->
441                 <type fullname="System.Void" preserve="fields" />
442
443                 <!-- comiterop.c -->
444                 <type fullname="System.__ComObject" feature="com" />
445
446                 <!-- class.c: generic_array_methods -->
447                 <type fullname="System.Collections.Generic.ICollection`1" />
448                 <type fullname="System.Collections.Generic.IEnumerable`1" />
449                 <type fullname="System.Collections.Generic.IReadOnlyList`1" />
450                 <type fullname="System.Collections.Generic.IReadOnlyCollection`1" />
451                 
452                 <!-- domain.c: mono_defaults.generic_ilist_class -->
453                 <type fullname="System.Collections.Generic.IList`1" />
454                 
455                 <!-- aot-compiler.c: add_generic_instances and add_generic_class_with_depth -->
456                 <type fullname="System.Collections.Generic.GenericEqualityComparer`1">
457                         <method name=".ctor" />
458                 </type>
459                 
460                 <!-- aot-compiler.c: add_generic_instances and add_generic_class_with_depth -->
461                 <type fullname="System.Collections.Generic.GenericComparer`1">
462                         <method name=".ctor" />
463                 </type>
464
465                 <!-- icalls - but (at least parts of them) are used thru interfaces at runtime and cannot be linked out -->
466                 <type fullname="System.Globalization.DateTimeFormatInfo" preserve="fields" />
467                 <type fullname="System.Globalization.CompareInfo" preserve="fields" />
468                 <type fullname="System.Globalization.CultureInfo" preserve="fields">
469                         <!-- icall.c: fill_reflection_assembly_name (assert) and ves_icall_System_Reflection_Assembly_GetReferencedAssemblies (assert) -->
470                         <method name="CreateCulture" />
471                 </type>
472                 <type fullname="System.Globalization.NumberFormatInfo" preserve="fields" />
473                 <type fullname="System.Globalization.RegionInfo" preserve="fields" />
474                 <type fullname="System.Globalization.SortKey" preserve="fields" />
475
476                 <type fullname="System.IO.FileNotFoundException">
477                         <!-- mini.c (mono_jit_compiler_method_inner) mono_exception_from_name_msg -->
478                         <method signature="System.Void .ctor(System.String)" />
479                         <!-- exception.c (mono_get_exception_file_not_found and mono_get_exception_file_not_found) -->
480                         <!-- mono_exception_from_name_two_strings -->
481                         <method signature="System.Void .ctor(System.String,System.String)" />
482                 </type>
483
484                 <!-- exception.c (mono_get_exception_io) -->
485                 <type fullname="System.IO.IOException">
486                         <!-- mono_exception_from_name_msg -->
487                         <method signature="System.Void .ctor(System.String)" />
488                 </type>
489
490                 <!-- fileio.h: shared structure between the managed and unmanaged worlds -->
491                 <type fullname="System.IO.MonoIOStat" preserve="fields" />
492                 
493                 <!-- domain.c: mono_defaults.math_class
494                         method-to-ir.c: empty branch (wrt Min/Max optimization)
495                         mini-[x86|amd64].c needs the type but then only check for names
496                         note: there's no fields (static type) but that will mark the type itself -->
497                 <type fullname="System.Math" preserve="fields" />
498
499                 <type fullname="System.Reflection.MonoAssembly">
500                         <method name=".ctor" />
501                 </type>
502                 <type fullname="System.Reflection.MonoModule">
503                         <method name=".ctor" />
504                 </type>
505
506                 <!-- appdomain.c: ves_icall_System_AppDomain_GetAssemblies -->
507                 <type fullname="System.Reflection.Assembly" preserve="fields">
508                         <method name="MonoDebugger_GetMethodToken" feature="sre" />
509                         <method name="GetNamespaces" feature="sre" />
510                 </type>
511                 <type fullname="System.Reflection.AssemblyName" preserve="fields" />
512                 <type fullname="System.Reflection.ConstructorInfo" preserve="fields" />
513
514                 <!-- domain.c: mono_defaults.customattribute_data_class -->
515                 <type fullname="System.Reflection.CustomAttributeData" preserve="fields">
516                         <!-- custom-attrs.c: create_custom_attr_data - create an instance with the ctor using 4 arguments -->
517                         <method signature="System.Void .ctor(System.Reflection.ConstructorInfo,System.Reflection.Assembly,System.IntPtr,System.UInt32)" />
518                 </type>
519
520                 <!-- reflection.c: create_cattr_named_arg - create an instance with the ctor using 2 parameters -->
521                 <type fullname="System.Reflection.CustomAttributeNamedArgument">
522                         <method signature="System.Void .ctor(System.Reflection.MemberInfo,System.Object)" />
523                 </type>
524                 
525                 <!-- reflection.c: create_cattr_typed_arg - create an instance with the ctor using 2 parameters -->
526                 <type fullname="System.Reflection.CustomAttributeTypedArgument">
527                         <method signature="System.Void .ctor(System.Type,System.Object)" />
528                 </type>
529                 <type fullname="System.Reflection.EventInfo" preserve="fields">
530                         <method name="AddEventFrame" />
531                         <method name="StaticAddEventAdapterFrame" />
532                 </type>
533                 
534                 <!-- reflection.c: mono_method_body_get_object -->
535                 <type fullname="System.Reflection.ExceptionHandlingClause" preserve="fields" />
536                 
537                 <!-- domain.c: mono_defaults.field_info_class -->
538                 <type fullname="System.Reflection.FieldInfo" preserve="fields" />
539                 
540                 <!-- reflection.c: mono_method_body_get_object -->
541                 <type fullname="System.Reflection.LocalVariableInfo" preserve="fields" />
542
543                 <!-- reflection.c: mono_method_body_get_object -->
544                 <type fullname="System.Reflection.MethodBody" preserve="fields" />
545                 <!-- domain.c: mono_defaults.method_info_class -->
546                 <type fullname="System.Reflection.MethodInfo" preserve="fields" />
547
548                 <type fullname="System.Reflection.Module" preserve="fields" />
549                 <type fullname="System.Reflection.MonoAssembly" preserve="fields" />
550                 <type fullname="System.Reflection.MonoModule" preserve="fields" />
551                 <type fullname="System.Reflection.MonoCMethod" preserve="fields" />
552                 <type fullname="System.Reflection.MonoEvent" preserve="fields" />
553                 <type fullname="System.Reflection.MonoEventInfo" preserve="fields" />
554                 <type fullname="System.Reflection.MonoField" preserve="fields" />
555                 
556                 <!-- reflection.c: mono_method_get_object uses both MonoGeneric[C]Method / will crash for ves_icall_Type_GetConstructors_internal -->
557                 <type fullname="System.Reflection.MonoGenericMethod" preserve="fields" />
558                 <type fullname="System.Reflection.MonoGenericCMethod" preserve="fields" />
559                 
560                 <type fullname="System.Reflection.MonoMethod" preserve="fields" />
561                 <type fullname="System.Reflection.MonoMethodInfo" preserve="fields" />
562                 <type fullname="System.Reflection.MonoPropertyInfo" preserve="fields" />
563                 
564                 <type fullname="System.Reflection.MonoProperty" preserve="fields">
565                         <method name="GetterAdapterFrame" />
566                         <method name="StaticGetterAdapterFrame" />
567                 </type>
568                 <type fullname="System.Reflection.ParameterInfo" preserve="fields" />
569                 <!-- reflection.c: ves_icall_get_parameter_info -->
570                 <type fullname="System.Reflection.MonoParameterInfo" preserve="fields" />
571
572                 <!-- object.c: mono_field_get_value_object and mono_runtime_invoke_array -->
573                 <type fullname="System.Reflection.Pointer" >
574                         <method name="Box" />
575                 </type>
576
577                 <type fullname="System.Reflection.PropertyInfo" preserve="fields" />
578                 
579                 <!-- exception.c (mono_get_exception_reflection_type_load) -->
580                 <type fullname="System.Reflection.ReflectionTypeLoadException">
581                         <method signature="System.Void .ctor(System.Type[],System.Exception[])" />
582                 </type>
583
584                 <!-- icall.c: ves_icall_InternalInvoke -->
585                 <type fullname="System.Reflection.TargetException">
586                         <!-- mono_exception_from_name_msg -->
587                         <method signature="System.Void .ctor(System.String)" />
588                 </type>
589         
590                 <!-- icall.c: ves_icall_InternalInvoke -->
591                 <type fullname="System.Reflection.TargetParameterCountException">
592                         <!-- mono_exception_from_name_msg -->
593                         <method signature="System.Void .ctor(System.String)" />
594                 </type>
595
596                 <type fullname="System.Reflection.Emit.AssemblyBuilder" preserve="fields" feature="sre">
597                         <method name="AddPermissionRequests" />
598                         <method name="AddModule" />
599                         <method name="DefineIconResource" />
600                         <method name="AddTypeForwarder" />
601                         <method name="EmbedResourceFile" />
602                 </type>
603                 <type fullname="System.Reflection.Emit.ConstructorBuilder" preserve="fields" feature="sre">
604                         <method name="RuntimeResolve" />
605                 </type>
606                 <type fullname="System.Reflection.Emit.CustomAttributeBuilder" preserve="fields" feature="sre" />
607                 <type fullname="System.Reflection.Emit.DynamicMethod" preserve="fields" />
608                 <type fullname="System.Reflection.Emit.EnumBuilder" preserve="fields" />
609                 <type fullname="System.Reflection.Emit.EventBuilder" preserve="fields" />
610                 <type fullname="System.Reflection.Emit.FieldBuilder" preserve="fields" >
611                         <method name="RuntimeResolve" />
612                 </type>
613                 <type fullname="System.Reflection.Emit.GenericTypeParameterBuilder" preserve="fields" feature="sre" >
614                         <method name="RuntimeResolve" />
615                 </type>
616                 <type fullname="System.Reflection.Emit.ILExceptionBlock" preserve="fields" feature="sre" />
617                 <type fullname="System.Reflection.Emit.ILExceptionInfo" preserve="fields" />
618                 <type fullname="System.Reflection.Emit.ILGenerator" preserve="fields">
619                         <method name="Mono_GetCurrentOffset" />
620                 </type>
621                 <type fullname="System.Reflection.Emit.LocalBuilder" preserve="fields" feature="sre" >
622                         <method name="Mono_GetLocalIndex" />
623                 </type>
624                 <type fullname="System.Reflection.Emit.MethodBuilder" preserve="fields" feature="sre" >
625                         <method name="RuntimeResolve" />
626                 </type>
627                 <type fullname="System.Reflection.Emit.ModuleBuilder" preserve="fields" feature="sre">
628                         <method name="Mono_GetGuid" />
629                         <method name="RuntimeResolve" />
630                 </type>
631                 <type fullname="System.Reflection.Emit.MonoResource" preserve="fields" feature="sre" />
632                 <type fullname="System.Reflection.Emit.MonoWin32Resource" preserve="fields" feature="sre" />
633                 <type fullname="System.Reflection.Emit.ParameterBuilder" preserve="fields" feature="sre" />
634                 <type fullname="System.Reflection.Emit.PropertyBuilder" preserve="fields" feature="sre" />
635                 <type fullname="System.Reflection.Emit.SignatureHelper" preserve="fields" feature="sre" />
636                 <type fullname="System.Reflection.Emit.TypeBuilder" preserve="fields" feature="sre">
637                         <method name="SetCharSet" />
638                         <!-- reflection.c mono_reflection_call_is_assignable_to () -->
639                         <method name="IsAssignableTo" />
640                 </type>
641                 <type fullname="System.Reflection.Emit.UnmanagedMarshal" preserve="fields" feature="sre" >
642                         <method name="DefineCustom" />
643                         <method name="DefineLPArrayInternal" />
644                 </type>
645                 <type fullname="System.Reflection.Emit.TypeBuilderInstantiation" preserve="fields" feature="sre" >
646                         <method name="RuntimeResolve" />
647                 </type>
648                 <type fullname="System.Reflection.Emit.ArrayType" preserve="fields" feature="sre" >
649                         <method name="RuntimeResolve" />
650                 </type>
651                 <type fullname="System.Reflection.Emit.ByRefType" preserve="fields" feature="sre" >
652                         <method name="RuntimeResolve" />
653                 </type>
654                 <type fullname="System.Reflection.Emit.PointerType" preserve="fields" feature="sre" >
655                         <method name="RuntimeResolve" />
656                 </type>
657                 <type fullname="System.Reflection.Emit.FieldOnTypeBuilderInst" preserve="fields" feature="sre" >
658                         <method name="RuntimeResolve" />
659                 </type>
660                 <type fullname="System.Reflection.Emit.MethodOnTypeBuilderInst" preserve="fields" feature="sre" >
661                         <method name="RuntimeResolve" />
662                 </type>
663                 <type fullname="System.Reflection.Emit.ConstructorOnTypeBuilderInst" preserve="fields" feature="sre" >
664                         <method name="RuntimeResolve" />
665                 </type>
666
667                 <!-- domain.c: mono_defaults.internals_visible_class -->
668                 <type fullname="System.Runtime.CompilerServices.InternalsVisibleToAttribute" />
669
670                 <!-- exception.c: mono_get_exception_runtime_wrapped () -->
671                 <type fullname="System.Runtime.CompilerServices.RuntimeWrappedException">
672                         <method signature="System.Void .ctor(System.Object)" />
673                 </type>
674
675                 <!-- icall.c | object-internal.h: MonoReflectionDllImportAttribute structure -->
676                 <type fullname="System.Runtime.InteropServices.DllImportAttribute" preserve="fields"/> 
677                 <!-- marshal.c: emit_marshal_custom (DISABLE_JIT is not defined for the AOT compiler, only the ARM runtimes) -->
678                 <type fullname="System.Runtime.InteropServices.ICustomMarshaler" />
679
680                 <!-- domain.c: mono_defaults.marshal_class -->
681                 <type fullname="System.Runtime.InteropServices.Marshal" preserve="fields" >
682                         <!-- marshal.c (mono_marshal_get_struct_to_ptr) -->
683                         <method name="StructureToPtr" />
684                 </type>
685                 
686                 <!-- domain.c: mono_defaults.safehandle_class -->
687                 <type fullname="System.Runtime.InteropServices.SafeHandle" preserve="fields">
688                         <!-- marshal.c (init_safe_handle) -->
689                         <method name="DangerousAddRef" />
690                         <method name="DangerousRelease" />
691                 </type>
692                 
693                 <!-- object-internals.h: defines MonoReflectionUnmanagedFunctionPointerAttribute, marshal.c: use it -->
694                 <type fullname="System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute" preserve="fields"/>
695
696                 <!-- marshal.c: mono_mb_emit_exception_marshal_directive -->
697                 <type fullname="System.Runtime.InteropServices.MarshalDirectiveException">
698                         <method signature="System.Void .ctor(System.String)" />
699                 </type>
700
701                 <!-- appdomain.c: mono_context_init -->
702                 <!-- marshal.c: mono_remoting_marshal_init / removed with DISABLE_REMOTING -->
703                 <type fullname="System.Runtime.Remoting.Contexts.Context" preserve="fields" feature="remoting" >
704                         <method name="get_NeedsContextSink" />
705                 </type>
706
707                 <!-- domain.c: mono_defaults.iremotingtypeinfo_class / removed with DISABLE_REMOTING -->
708                 <type fullname="System.Runtime.Remoting.IRemotingTypeInfo" feature="remoting">
709                         <method name="CanCastTo" />
710                 </type>
711
712                 <!-- domain.c: mono_defaults.asyncresult_class (Stubify can't be applied on this type) -->
713                 <!-- object.c MONO_OBJECT_SETREF in mono_async_result_new -->
714                 <!-- threadpool.c: MONO_OBJECT_SETREF in create_simple_asyncresult -->
715                 <type fullname="System.Runtime.Remoting.Messaging.AsyncResult" preserve="fields" />
716
717                 <!-- marshal.c: mono_remoting_marshal_init / removed with DISABLE_REMOTING -->
718                 <type fullname="System.Runtime.Remoting.Messaging.CallContext" feature="remoting" >
719                         <method name="SetCurrentCallContext" />
720                 </type>
721                 <type fullname="System.Runtime.Remoting.Messaging.MonoMethodMessage" preserve="fields" feature="remoting" >
722                         <method name="InitMessage" />
723                 </type>
724                 <type fullname="System.Runtime.Remoting.Proxies.RealProxy" preserve="fields" feature="remoting" >
725                         <method name="PrivateInvoke" />
726                         <method name="GetAppDomainTarget" />
727                 </type>
728                 <type fullname="System.Runtime.Remoting.Proxies.TransparentProxy" preserve="fields" feature="remoting" >
729                         <method name="LoadRemoteFieldNew" />
730                         <method name="StoreRemoteField" />
731                 </type>
732                 <type fullname="System.Runtime.Remoting.RemotingServices" feature="remoting" >
733                         <method name="SerializeCallData" />
734                         <method name="DeserializeCallData" />
735                         <method name="SerializeExceptionData" />
736                 </type>
737
738                 <!-- domain.c: mono_defaults.mono_method_message_class -->
739                 <type fullname="System.Runtime.Remoting.Messaging.MonoMethodMessage" preserve="fields">
740                         <!-- object.c: mono_message_init -->
741                         <method name="InitMessage" />
742                 </type>         
743
744                 <!-- domain.c: mono_defaults.real_proxy_class / removed with DISABLE_REMOTING -->
745                 <type fullname="System.Runtime.Remoting.Proxies.RealProxy" feature="remoting" />
746
747                 <!-- domain.c: mono_defaults.transparent_proxy_class / removed with DISABLE_REMOTING -->
748                 <type fullname="System.Runtime.Remoting.Proxies.TransparentProxy" feature="remoting" />
749
750                 <!-- exception.c (mono_get_exception_serialization) -->
751                 <type fullname="System.Runtime.Serialization.SerializationException">
752                         <!-- mono_exception_from_name_msg -->
753                         <method signature="System.Void .ctor(System.String)" />
754                 </type>
755
756                 <!-- domain.c: mono_defaults.runtimesecurityframe_class -->             
757                 <type fullname="System.Security.RuntimeSecurityFrame" preserve="fields" />
758                 
759                 <!-- domain.c: mono_defaults.executioncontext_class -->
760                 <type fullname="System.Threading.ExecutionContext">
761                         <!-- security-manager.c: mono_get_context_capture_method (can likely be removed) -->
762                         <method name="Capture" />
763                 </type>
764
765                 <!-- aot-runtime.c: mono_aot_get_method -->
766                 <type fullname="System.Threading.Interlocked">
767                         <method name="CompareExchange" />
768                         <method name="Exchange" />
769                 </type>
770                 
771                 <!-- domain.c: mono_defaults.monitor_class -->
772                 <!-- monitor.c / method-to-ir.c: Enter and Exit are only string comparison (safe to link) -->
773                 <type fullname="System.Threading.Monitor">
774                         <!-- marshal.c: mono_marshal_get_synchronized_wrapper-->
775                         <method name="Enter" />
776                         <method name="Exit" />
777                 </type>
778
779                 <!-- domain.c: mono_defaults.manualresetevent_class -->
780                 <type fullname="System.Threading.ManualResetEvent" >
781                         <!-- runtime access fields and setter from inherited WaitHandle -->
782                         <method signature="System.Void .ctor(System.Boolean)" />
783                 </type>
784
785                 <!-- exception.c (mono_get_exception_synchronization_lock) -->
786                 <type fullname="System.Threading.SynchronizationLockException">
787                         <!-- mono_exception_from_name_msg -->
788                         <method signature="System.Void .ctor(System.String)" />
789                 </type>
790
791                 <!-- domain.c: mono_defaults.thread_class -->
792                 <type fullname="System.Threading.Thread" preserve="fields">
793                         <method name="get_CurrentContext" />
794                 </type>
795                 
796                 <!-- domain.c: mono_defaults.internal_thread_class -->
797                 <type fullname="System.Threading.InternalThread" preserve="fields" />
798                 
799                 <!-- domain.c: mono_defaults.threadabortexception_class -->
800                 <!-- exception.c (mono_get_exception_thread_abort) -->
801                 <type fullname="System.Threading.ThreadAbortException">
802                         <!-- mono_exception_from_name -->
803                         <method signature="System.Void .ctor()" />
804                 </type>
805                 
806                 <!-- exception.c (ThreadInterruptedException) -->
807                 <type fullname="System.Threading.ThreadInterruptedException">
808                         <!-- mono_exception_from_name -->
809                         <method signature="System.Void .ctor()" />
810                 </type>
811
812                 <!-- exception.c (mono_get_exception_thread_abort) -->
813                 <type fullname="System.Threading.ThreadStateException">
814                         <!-- mono_exception_from_name_msg -->
815                         <method signature="System.Void .ctor(System.String)" />
816                 </type>
817                 
818                 <!-- object-internals.h: defines MonoWaitHandle, threadpool.c: gets the handle from the structure -->
819                 <type fullname="System.Threading.WaitHandle" preserve="fields">
820                         <!-- object.c: mono_wait_handle_new -->
821                         <method name="set_Handle" />
822                         <!-- object.c: mono_wait_handle_get_handle -->
823                         <field name="safe_wait_handle" />
824                 </type>
825
826                 <!-- threadpool-ms.c (worker_thread) -->
827                 <type fullname="System.Threading._ThreadPoolWaitCallback">
828                   <method name="PerformWaitCallback"/>
829                 </type>
830
831                 <!-- domain.c: mono_defaults.stringbuilder_class -->
832                 <type fullname="System.Text.StringBuilder" preserve="fields" />
833
834                 <!-- cominterop.c -->
835                 <type fullname="Mono.Interop.ComInteropProxy" feature="com" />
836                 <type fullname="Mono.Interop.IDispatch" feature="com" />
837                 <type fullname="Mono.Interop.IUnknown" feature="com"/>
838
839                 <!--
840                 Many applications rely on Mono.Runtime to exist in order to detect
841                 whether they are running on Mono or .NET. Thus we always preserve it
842                 to allow such detection logic to work, even if the class is not used
843                 directly.
844                 -->
845                 <type fullname="Mono.Runtime" />
846
847                 <!-- marshal.c (mono_marshal_get_native_wrapper) -->
848                 <type fullname="Mono.RuntimeStructs/HandleStackMark" />
849                 <!-- marshal.c (mono_marshal_get_native_wrapper) -->
850                 <type fullname="Mono.RuntimeStructs/MonoError" />
851         </assembly>
852 </linker>