Talk:Portable Executable

message: PE does support position-independent code, it's just that no compiler or linker does. Interix executables compiled with GCC are position-independent PEs  —Preceding unsigned comment added by 151.48.66.164 (talk) 22:48, 21 November 2008 (UTC)
thread_title:  Position-independent code 

message: Much of this is inaccurate. The .NET CLR is NOT 'added after the PE/COFF headers' nor does the CLR itself contain the mscoree!_CorExeMain or mscoree!_CorDllMain reference. The CLR header, defined as IMAGE_COR20_HEADER, is referenced through a data directory (#14) in the PE/COFF header. This data directory points to the virtual address and size of the CLR header.
The normal PE/COFF IMPORT table contains the mscoree!_Cor*Main reference. The entry point has a single jmp far instruction into the IAT table entry for this single import.
The IMAGE_COR20_HEADER is used by the CLR when it is loaded into the process space through a .NET aware operating system (WindowsXP+) or through the mscoree!CorExeMain or mscoree!CoreDllMain APIs.
:So I gather three things are wrong: 
::1)The CLR header and data sections are not placed at some memory address after the PE/COFF header section.
::2)The reference to CorExeMain and mscoree are not in the CLR header or data sections, but instead the import table
::3)The CLR header is referenced/loaded by the CLR, not by the loader directly.
::I've made changes accordingly.  Thanks for the corrections.
:::Vector4F 21:49, 20 November 2005 (UTC)
thread_title:  Errors 

message: The "PE File Format Diagram" is broken, I don't know the right link... FYI Gil_mo 07:25, 15 July 2007 (UTC)
thread_title:  Broken link in OpenRCE 

message: This article is poorly written! anyone explain PE format more clearly? Visame (talk) 18:42, 4 May 2008 (UTC)
thread_title:  Poor Quality!Needs Improving Badly! 

message: What's the difference between Portable Executable and Universal Binary? If I've understood it right Portable Executable is single binary file which has built in binary code for several different architectures while Universal Binary is more like a container for different binaries for different architectures. Is that correct or are both the one and same thing? --Dekonega (talk) 13:23, 10 November 2009 (UTC)
replies: text: Universal binary refers to a Mach-O file that contains compiled code for PowerPC and Intel architectures. A common compiler flag used in Mac OS X is 32_64_universal which compiles an application as 32 and 64-bit for both PowerPC and Intel (the resulting executable ending up with instructions for 4 architectures). Dread Lord CyberSkull ✎☠ 09:33, 29 December 2011 (UTC)
thread_title:  Universal Binary? 

message: I've been reading up on the likelihood that the Xbox console used a somewhat-modified form of the Portable Executable format for its .xbe executable files. Can anyone substantiate this supposition? Did the format translate over the to the Xbox 360? If either answer is affirmative, should those pieces of information be included in the article?—WhosAsking (talk) 18:40, 13 June 2010 (UTC)
thread_title:  Xbox use a similar format? 

message: Was PE specification open from the start or was it reverse-engineered and published post factum? 93.175.21.184 (talk) 16:15, 13 January 2011 (UTC)
replies: text: http://www.csn.ul.ie/~caolan/publink/winresdump/winresdump/doc/pefile2.html
The first decent material on the subject was a famous MSDN Magazine article by Matt Pietrek in 1994. — Vano 23:57, 16 July 2013 (UTC)
thread_title:  Was PE proprietary at first? 

message: Does PE support multiple binaries like Mach-O does? It is not clear from the article whether it does or not. Dread Lord CyberSkull ✎☠ 09:34, 29 December 2011 (UTC)
replies: text: No A PE executable is a DOS Executable with extra DATA unlike universal MAC binaries where you have an archive which contain other executable archive: See Below. 2A02:8422:1191:6E00:56E6:FCFF:FEDB:2BBA (talk) 22:42, 16 July 2013 (UTC)
thread_title:  Multiple binaries? 

message: This graphic https://upload.wikimedia.org/wikipedia/commons/7/70/Portable_Executable_32_bit_Structure_in_SVG.svg was so well done and professional looking, that I'd assumed that whoever made it really knew what they were talking about and had done their research. Apparently though, at least on one part of it, they had not. That part is the DataDirectory part. There are only 15 entries in it in the diagram in question. However there are actually supposed to be 16 entries in it, with the last one always blank (filled with 0x00 bytes). I was depending on this diagram for the specs of the PE format, and was using the info shown in this diagram in designing a piece of software I was making. I was trusting that diagram because it looked so well done, that I was assuming it was correct. But it wasn't, as have explained. I found that it was wrong, because my program always was failing to correctly extract data correctly from an EXE file. The section headers (which is what my program was designed to extract) are supposed to start immediately after the DataDirectory, but because your diagram that I was using for my info showed that directory to only have 15 entries, my program was always starting 8 bytes too soon when extracting section headers. I couldn't figure out why, but eventually I decided to scour the net, to see if maybe, just maybe, there was an error in this diagram. It turns out that indeed there is an error in it. It shows the DataDirectory holding only 15 entries, when in fact it should be 16 entries, just with the last entry always empty. After fixing this error, my program worked perfectly.
I don't know how to edit SVG graphics or how to upload any files to Wikipedia. If I did, I'd correct this error myself. So can somebody please fix this? I don't want any other programmers out there to be looking at this diagram, depending on the info it presents when writing their program, and end up getting their program wrong, and then have to go and waste an hour debugging their program like I did, to fix an error that never should have been there to start with.
Benhut1 (talk) 05:42, 10 January 2016 (UTC)
thread_title:  DataDirectory error in diagram depicting EXE file headers 

message: Reference number 3: "Microsoft Portable Executable and Common Object File Format Specification, Microsoft Corporation, Revision 6.0 - February 1999" points to https://download.microsoft.com/download/e/b/a/eba1050f-a31d-436b-9281-92cdfeae4b45/pecoff.doc which is invalid.  — Preceding unsigned comment added by 131.91.169.98 (talk) 18:41, 11 May 2017 (UTC)
replies: text: Done The dead link in reference 3 was replaced by the new link (https://www.microsoft.com/en-us/download/details.aspx?id=19509). Luis150902 (talk | contribs) 21:26, 13 June 2017 (UTC)
thread_title:  Reference #3 is a dead link 

message: Propose merging PE infection with this article and/or Malware: PE infection is a stub with only two sentences and one reference, that can be merged with this article and/or Malware. Luis150902 (talk | contribs) 20:51, 13 June 2017 (UTC)
thread_title:  Merge [[PE infection]] with this article and/or [[Malware]] 

message: Two references that point into oblivion, but I found alternatives
An In-Depth Look into the Win32 Portable Executable File Format, Part 1
An In-Depth Look into the Win32 Portable Executable File Format, Part 2
--Dan Oom (talk) 20:45, 28 February 2019 (UTC)
thread_title:  More broken links