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/10/17 02:50] (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 18: Line 23:
 | 18h | WORD | e_lfarlc | Offset of the first relocation item in the file. | | 18h | WORD | e_lfarlc | Offset of the first relocation item in the file. |
 | 1Ah | WORD | e_ovno | Overlay number. Normally zero, meaning that it's the main program. | | 1Ah | WORD | e_ovno | Overlay number. Normally zero, meaning that it's the main program. |
-| 1Ch | DWORD | e_res | |+| 1Ch | DWORD | e_res | Reserved |
 | 20h | WORD | e_oemid | | | 20h | WORD | e_oemid | |
 | 22h | WORD | e_oeminfo | | | 22h | WORD | e_oeminfo | |
-| 24h | 24 WORD | e_res2 | | +| 24h | 24 WORD | e_res2 | Reserved 
-2ch | DWORD | e_lfanew |+3ch | DWORD | e_lfanew | Offset of the first byte of extended header (NE, LX, LE, PE...) |