Skip to content

Latest commit

 

History

History
23 lines (12 loc) · 1.64 KB

i.12.2-module-information.md

File metadata and controls

23 lines (12 loc) · 1.64 KB

I.12.2 Module information

Partition II provides details of the CLI PE file format. The CLI relies on the following information about each method defined in a PE file:

  • The instructions composing the method body, including all exception handlers.

  • The signature of the method, which specifies the return type and the number, order, parameter passing convention, and built-in data type of each of the arguments. It also specifies the native calling convention (this does not affect the CIL virtual calling convention, just the native code).

  • The exception handling array. This array holds information delineating the ranges over which exceptions are filtered and caught. See Partition II and §I.12.4.2.

  • The size of the evaluation stack that the method will require.

  • The size of the locals array that the method will require.

  • A "localsinit flag" that indicates whether the local variables and memory pool (§I.12.3.2.4) should be initialized by the CLI (see also localloc §III.3.47).

  • Type of each local variable in the form of a signature of the local variable array (called the "locals signature").

In addition, the file format is capable of indicating the degree of portability of the file. There is one kind of restriction that can be described:

  • Restriction to a specific 32-bit size for integers.

By stating which restrictions are placed on executing the code, the CLI class loader can prevent non-portable code from running on an architecture that it cannot support.