The entry table lists the module’s entry points: the places other modules can call or
refer to, and forwarders to entry points in other modules. It is at the header’s entry
table offset (0x5C, from the start of the LX header). Entry points are
numbered by ordinal, from 1, in the order they appear, and the
name tables give names to some of them.
Bundles
The entries come in bundles of entries of one type. Each bundle starts:
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 1 | Count | The number of entries in the bundle; 0 ends the table. |
| 1 | 1 | Type | The type of the entries, below. Bit 7 (0x80) says parameter typing information is present; IBM reserves it for future use. |
| 2 | 2 | Object | The object the entries are in, from 1; reserved, 0, for forwarders. Not present for type 0. |
Then come the entries, all of the bundle’s type:
| Type | Entries | Each entry |
|---|---|---|
| 0 | Unused | None: the bundle only skips count ordinals. |
| 1 | 16-bit entry | Flags (1 byte), offset (2 bytes). |
| 2 | 286 call gate | Flags (1), offset (2), call gate selector (2), filled in by the loader. |
| 3 | 32-bit entry | Flags (1), offset (4). |
| 4 | Forwarder | Flags (1), module ordinal (2), then the procedure’s name offset or ordinal (4). |
The entry flags: bit 0 (0x01) the entry is exported; bits 3 to 7
(0xF8) the number of parameter words (types 1 and 2) or doublewords
(type 3).
Forwarders
A forwarder says that the entry point is really in another module. Its module ordinal is the module’s number in the import module table, from 1. When its flags have bit 0 set, the last field is the procedure’s ordinal in that module; otherwise it is the offset of the procedure’s name in the import procedure table.
IBM’s description says a loader follows forwarders until it reaches a real entry point, and that a circular chain, or one longer than 1,024, is a load error. The explorer shows a forwarder as the module and procedure it leads to, without following it.
Example
The entry table of A32SBFM.DLL, at 0x197, is the single byte
00: no bundles, so the driver exports no entry points.