pavankumar varanasi
What is PE(Portable Executable)? What internally happens when compiling and executing?
Posted by pavankumar varanasi in C# Language on Dec 18, 2012
  • 0
  • 4
  • 4258
Do you know the answer for this question? Post it below.
Guest
Posted by Sam Hobbs on Mar 15, 2013
  • 0

Note that the relevant Wikipedia article says (in part) that the "PE format is a data structure that encapsulates the
information necessary for the Windows OS loader to manage the wrapped executable code". I say that because it was posted previously. The Wikipedia article also says "PE is a modified version of the Unix COFF file format". The PE format originally existed for unmanaged software and still is. If the interviewer is interested in your understanding of unmanaged software and you only give an answer for managed software then you will likely not do well. So the following describes what a PE file is and how it is used for unmanaged software. For unmanaged software, PE files are created by a link editor, also called a linker (or linkage editor in the context of IBM Mainframe computers). Unmanaged compilers create object files; one object file for each compiler input file. The link editor combines (links) the contents of the object files into an executable file such as a PE file. For unmanaged software, PE files contain machine code and other data necessary for execution.

Posted by Jaya Kukudkar on Feb 24, 2013
  • 0

PE is a Portable Executable file that contains assembly manifest information.



At a high level, the process of compiling and running a C# program can be illustrated as follows :



1. Compilation - Converting source code in C# language into bytecode in IL (Intermediate Language) using C# compiler.



This step is usually done by the Microsoft C# compiler like the "csc" command line tool, which will actually write the bytecode in a PE (Portable Executable) file.



2. Execution - Converting bytecode in Intermediate Language into native code in machine language on-the-fly (or just-in-time) and executing the native code in a single step.



This step is usually done by the Microsoft CLR (Common Language Runtime), which will be invoked when a PE file with IL bytecode is loaded into the Windows system.

Posted by Upamanyu Roy Choudhury on Feb 19, 2013
  • 0

A PE file is a Portable Executable file.



PE is the name given to standard 32 bit Windows executables and defined the structure of the .exe file format. These files contain header information, resource and the raw machine code compiled from an applications souirce code.



Please have a look at the following



http://www.herongyang.com/C-Sharp/Intermediate-Language-Compile-and-Run-C-Sharp-Program.html



http://www.codeproject.com/Articles/9019/Compiling-and-Executing-Code-at-Runtime

http://msdn.microsoft.com/en-us/library/ht8ecch6(v=vs.71).aspx

Posted by Udhayakumar R on Dec 26, 2012
  • 0

The PE format is a data structure that encapsulates the information necessary for the Windows OS loader to manage the wrapped executable code


Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS

PRIVACY POLICY | TERMS & CONDITIONS | SITEMAP | CONTACT US | ABOUT US | REPORT ABUSE
2014© C# Corner. All contents are copyright of their authors.