Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Portable Executable
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== .NET, metadata, and the PE format == In a .NET executable, the PE code section contains a stub that invokes the [[Common Language Runtime|CLR]] virtual machine startup entry, <code>_CorExeMain</code> or <code>_CorDllMain</code> in <code>mscoree.dll</code>, much like it was in [[Visual Basic]] executables. The virtual machine then makes use of .NET metadata present, the root of which, <code>IMAGE_COR20_HEADER</code> (also called "CLR header") is pointed to by <code>IMAGE_DIRECTORY_ENTRY_COMHEADER</code> (the entry was previously used for [[COM+]] metadata in COM+ applications, hence the name{{cn|date=July 2024}}) entry in the PE header's data directory. <code>IMAGE_COR20_HEADER</code> strongly resembles PE's optional header, essentially playing its role for the CLR loader.<ref name="PE Format (Windows)"/> The CLR-related data, including the root structure itself, is typically contained in the common code section, <code>.text</code>. It is composed of a few directories: metadata, embedded resources, strong names and a few for native-code interoperability. Metadata directory is a set of tables that list all the distinct .NET entities in the assembly, including types, methods, fields, constants, events, as well as references between them and to other assemblies.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)