PEI 格式是什么?

What is the PEI format?

我知道PE是COFF的修改版,PE+是PE的修改版,支持64位,但是什么是PEI?我说 PE 和 PEI 之间没有区别并且可以互换使用是否正确?

"The sole difference between the pe format and the pei format is that the latter has an MSDOS 2.0 .exe header on the front that prints the message "This app must be run under Windows." (or some such). (FIXME: Whether that statement is really true or not is unknown. Are there more subtle differences between pe and pei formats? For now assume there aren't. If you find one, then for God sakes document it here!)

The Microsoft docs use the word "image" instead of "executable" because the former can also refer to a DLL (shared library). Confusion can arise because the i' inpei' also refers to "image". The `pe' format can also create images (i.e. executables), it's just that to run on a win32 system you need to use the pei format."

来源:

http://www.opensource.apple.com/source/gdb/gdb-1515/src/bfd/libpei.h

PEI 实际上并不是官方认可的格式或术语。 PE/COFF 标准只描述了两种格式:PE32(32 位格式)和 PE32+(64 位格式)。我以前听过关于 PE 与 PEI 的讨论,但我唯一遇到过 PEI 一词的地方是 libpei,在 的回答中引用。而且,正如该回答中引用的那样,libpei 开发人员似乎对术语本身感到困惑,因此使用术语 PEI 确实没有任何意义。

此外,运行 Windows 上的 PE 可执行文件需要 MS-DOS 存根是不正确的。它通常只是为了向后兼容而嵌入。