en:docs:tk:formats:exe

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:tk:formats:exe [2024/09/23 04:00] prokusheven:docs:tk:formats:exe [2024/09/23 05:49] (current) prokushev
Line 1: Line 1:
 ====== DOS Executable file format ====== ====== DOS Executable file format ======
  
-All multi-byte values are stored LSB first. One block is 512 bytes, one paragraph is 16 bytes.+  * All multi-byte values are stored LSB first. One block is 512 bytes, one paragraph is 16 bytes.  
 +  * If the word at offset 02h is 4, it should be treated as 00h, since pre-1.10 versions of the MS linker set it that way. 
 +  *  If both minimum and maximum allocation (offset 0Ah/0Ch) are zero, the program is loaded as high in memory as possible (DOS only checks the maximum allocation, however). 
 +  *  The maximum allocation is set to FFFFh by default. 
 +  *  Additional data may be contained in the file beyond the end of the load image described by the .EXE header; this data may be overlays, the actual executable for newer-format executables, or debugging information (see #01600,#01624). 
 +  *  Relocations entries need not be in any particular order, although they are typically stored in order from beginning to end of the load image
  
 ^ Offset ^ Size ^ Name ^ Description ^ ^ Offset ^ Size ^ Name ^ Description ^
Line 22: Line 27:
 | 22h | WORD | e_oeminfo | | | 22h | WORD | e_oeminfo | |
 | 24h | 24 WORD | e_res2 | | | 24h | 24 WORD | e_res2 | |
-| 2ch | DWORD | e_lfanew |+| 2ch | DWORD | e_lfanew | Offset of the first byte of extended header (NE, LX, LE, PE...) |