6.2.1 Information Block

The information block in the Windows header contains the linker version number, the lengths of various tables that further describe the executable file, the offsets from the beginning of the header to the beginning of these tables, the heap and stack sizes, and so on. The following list summarizes the contents of the header information block (the locations are relative to the beginning of the block):

Location Description

00h Specifies the signature word. The low byte contains “N” (4Eh) and the high byte contains “E” (45h).
02h Specifies the linker version number.
03h Specifies the linker revision number.
04h Specifies the offset to the entry table (relative to the beginning of the header).
06h Specifies the length of the entry table, in bytes.
08h Reserved.
0Ch Specifies flags that describe the contents of the executable file. This value can be one or more of the following bits:
Bit Meaning

0 The linker sets this bit if the executable-file format is SINGLEDATA. An executable file with this format contains one data segment. This bit is set if the file is a dynamic-link library (DLL).
1 The linker sets this bit if the executable-file format is MULTIPLEDATA. An executable file with this format contains multiple data segments. This bit is set if the file is a Windows application.
  If neither bit 0 nor bit 1 is set, the executable-file format is NOAUTODATA. An executable file with this format does not contain an automatic data segment.
2 Reserved.
3 Reserved.
8 Reserved.
9 Reserved.
11 If this bit is set, the first segment in the executable file contains code that loads the application.
13 If this bit is set, the linker detects errors at link time but still creates an executable file.
14 Reserved.
Location Description

Bit Meaning

15 If this bit is set, the executable file is a library module.
  If bit 15 is set, the CS:IP registers point to an initialization procedure called with the value in the AX register equal to the module handle. The initialization procedure must execute a far return to the caller. If the procedure is successful, the value in AX is nonzero. Otherwise, the value in AX is zero.
  The value in the DS register is set to the library's data segment if SINGLEDATA is set. Otherwise, DS is set to the data segment of the application that loads the library.

0Eh Specifies the automatic data segment number. (0Eh is zero if the SINGLEDATA and MULTIPLEDATA bits are cleared.)
10h Specifies the initial size, in bytes, of the local heap. This value is zero if there is no local allocation.
12h Specifies the initial size, in bytes, of the stack. This value is zero if the SS register value does not equal the DS register value.
14h Specifies the segment:offset value of CS:IP.
18h Specifies the segment:offset value of SS:SP.
  The value specified in SS is an index to the module's segment table. The first entry in the segment table corresponds to segment number 1.
  If SS addresses the automatic data segment and SP is zero, SP is set to the address obtained by adding the size of the automatic data segment to the size of the stack.
1Ch Specifies the number of entries in the segment table.
1Eh Specifies the number of entries in the module-reference table.
20h Specifies the number of bytes in the nonresident-name table.
22h Specifies a relative offset from the beginning of the Windows header to the beginning of the segment table.
24h Specifies a relative offset from the beginning of the Windows header to the beginning of the resource table.
26h Specifies a relative offset from the beginning of the Windows header to the beginning of the resident-name table.
28h Specifies a relative offset from the beginning of the Windows header to the beginning of the module-reference table.
2Ah Specifies a relative offset from the beginning of the Windows header to the beginning of the imported-name table.
Location Description
2Ch Specifies a relative offset from the beginning of the file to the beginning of the nonresident-name table.
30h Specifies the number of movable entry points.
32h Specifies a shift count that is used to align the logical sector. This count is log2 of the segment sector size. It is typically 4, although the default count is 9. (This value corresponds to the /alignment [/a] linker switch. When the linker command line contains /a:16, the shift count is 4. When the linker command line contains /a:512, the shift count is 9.)
34h Specifies the number of resource segments.
36h Specifies the target operating system, depending on which bits are set:
Bit Meaning

0 Operating system format is unknown.
1 Reserved.
2 Operating system is Microsoft Windows.
3 Reserved.
4 Reserved.

37h Specifies additional information about the executable file. It can be one or more of the following values:
Bit Meaning

1 If this bit is set, the executable file contains a Windows 2.x application that runs in version 3.x protected mode.
2 If this bit is set, the executable file contains a Windows 2.x application that supports proportional fonts.
3 If this bit is set, the executable file contains a fast-load area.

38h Specifies the offset, in sectors, to the beginning of the fast-load area. (Only Windows uses this value.)
3Ah Specifies the length, in sectors, of the fast-load area. (Only Windows uses this value.)
3Ch Reserved.
3Eh Specifies the expected version number for Windows. (Only Windows uses this value.)