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):
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 |
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 |