I've been reading CLR with C# 3.0 and I've been reflecting on Assemblies, Modules and Headers however things got complicated. This is what I understood but if would be great if someone can clarify things little bit more:
Modules are result of csc.exe which contains IL code and Metadata tables. Metadata tables contains three different tables which are:
- Definition Tables such as "ModuleDef, TypeDef, PropertyDef, MethodDef, EventDef, FieldDef"
- Reference Tables such as "TypeRef, ModuleRef, MemberRef,etc."
- Manifest Tables**
Assemblies are containers which contain many Modules as well as resources such as images, docs, pdf, etc.
- PE files that stands for Portable Executable are files can be .EXE or .DLL. These files have PE32 or PE32+ headers, CLR Headers, Metadata, IL Code.
The books says Assembly is a container consists of Modules and it also says Managed Module is
Managed Module:
A managed module is a standard 32-bit Microsoft Windows portable executable (PE32) file or a standard 64-bit Windows portable executable (PE32+) file that requires the CLR to execute.
Richter, Jeffrey (2010-02-05). CLR via C# (Kindle Locations 696-697). OReilly Media - A. Kindle Edition.
Definition of Assembly:
An assembly is a logical grouping of one or more modules or resource files.
Richter, Jeffrey (2010-02-05). CLR via C# (Kindle Locations 766-767). OReilly Media - A. Kindle Edition.
So it seems that Managed Module are actually part of the Assembly in the image taken from the same book.
PE32 headers belong to Assemblies, however author also says it belongs to Managed Modules as well, etc.
What's the separation here? Why did he use Module and Assemblies interchangeable even thought they look separate enough.
A managed PE file has four main parts: the PE32(+) header, the CLR header, the metadata, and the IL. The PE32(+) header is the standard information that Windows expects. The CLR header is a small block of information that is specific to modules that require the CLR (managed modules).
Richter, Jeffrey (2010-02-05). CLR via C# (Kindle Locations 1628-1629). OReilly Media - A. Kindle Edition.
Also the image clearly shows that Modules have only Metadata not PE32(+), CLR headers, etc. Do you think Manifest and Metadata can be used interchangeably?
And also could you please explain **Manifest tables in the Modules as well?