An virtual device drivers or some other applications for Microsoft
Windows or
IBM OS/2 operating system which uses 32-bits segments for 80386+
contains a combination of code and data or combination of
code, data, and resources. The `LINEAR-EXECUTABLE` file such as a NE
Header {NEW-STYLE} EXE file also contains two headers: an
MS-DOS header and a `LINEAR` EXE header. The ^Tp236 {MS-DOS (old-style)
executable-file header} contains four distinct parts: a collection of
header
information, a reserved section, a pointer to a `LINEAR` exe header,
and a stub program. The following illustrations shows the MS-DOS
executable-file header:
Beginning of file
00h
MS-DOS Header Info
20h
Reserved
3Ch
LE header offset
40h
MS-DOS stub program
Beginning of `LE` header
...
...
...
If word value at offset 18h is 40h or greater, the dword value at 3Ch is an offset to a `LE` header
MS-DOS uses stub program to display a message if Windows or OS/2 has not been loaded when the user attempts to run a program.
The `LINEAR` executable-file header contains information that the
loader requires for segmented executable files. This information
includes the linker version number, data specified by linker, data
specified by resource compiler, tables of segment data, tables of
resource data, and so on. The following illustrations shows the LE file
header:
The `information block` in the LE header contains the linker
version number, length 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):
The object table contains information that describes each segment in
an executable file. This information includes segment length, segment
type,
and segment-relocation data. The following list summarizes the values
found in in the segment table ( the locations are relative to the
beginning of each entry):