Portable executable(PE) is a dll or exe file created after the compilation.
Compiling source code architecture for C# is as Shown in figure
When you write the code and compiles the code the compiler(in the second block) check the syntax and produce a managed module(PE)
Parts Of PE
PE has mainly four parts
- PE Header : indicates the type of file (GUI or .dll) and it also contains time of the file created.Also contains the information of the native CPU code.
- CLR Header: Contains the information of version of managed module(PE),some flags,metadata ,the size of the metadata,strong name etc.
- Metadata: contains two tables,one contains types(eg:class used) and members defined in the source code and the second table contains members and types reffered by the source code)
- Intermediate Source Code(IL) : Compiler produce the compiled source code.the CLR then compiles the IL to native CPU instructions.
If you want to see the PE data.intermediate language deassembler(ILDASM) helps you to open the PE.
Open the visual studio command prompt and type ildasm and the PE(.dll or exe)will open the IL DASM from the open you can locate the PE and see how your PE is.
0 comments:
Post a Comment