Understanding the Microsoft Intermediate Language
page 6 of 12
by Joydip Kanjilal
Feedback
Average Rating: 
Views (Total / Last 10 Days): 51628/ 84

Class Loader

The MSIL code runs within the context of the CLR. The .text section of the PE contains the instruction code JMP_CorExeMain that is defined in the MSCorEE.dll file. This method reads the metadata information of the MSIL code and compiles the MSIL code to native code at runtime. Finally, it executes the main method. The Class Loader is responsible for reading the metadata information, validating them for consistency and creating an internal representation of the classes and its members. It is an object that is responsible for loading classes at runtime. Internally, the CLR uses the metadata and manifest information of an assembly for loading a class using the Class Loader. It should be noted that the assembly, type and method references are all resolved at runtime. Serge Lidin says in his renowned book Inside Microsoft.NET IL Assembler, "the loader reads the metadata and creates in memory an internal representation and layout of the classes and their members. It performs this task on demand, meaning that a class is loaded and laid out only when it is referenced. Classes that are never referenced are never loaded. When loading a class, the loader runs a series of consistency checks of the related metadata."


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-20 8:45:38 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search