An LX module has two name tables, laid out the same way. The resident names stay in memory while the module is loaded; the non-resident names are read from the file only when they are needed. Both give the module’s exported entry points their names, by ordinal: the number of the entry in the entry table.
Name entries
Each table is a run of entries, ended by a length of 0:
| Offset | Size | Field | Meaning |
|---|---|---|---|
| 0 | 1 | Length | The length of the name in bytes; 0 ends the table. |
| 1 | length | Name | The name, in single-byte characters, with no zero at the end. |
| 1 + length | 2 | Ordinal | The entry table ordinal the name belongs to. |
Resident names
The resident name table is at the header’s resident name table offset
(0x58, from the start of the LX header). Its first entry is the module’s
name, with ordinal 0. The names after it are exports that stay in memory.
0000018C 07 61 33 32 73 62 66 6D 00 00 00 .a32sbfm...
a32sbfm, ordinal 0, then the 0 that ends the tableNon-resident names
The non-resident name table is at a file offset, the header’s
0x88, and the header gives its size in bytes (0x8C). Its
first entry is the module’s description, as the linker was given it, with ordinal 0;
the rest are exported names. A32SBFM.DLL has none: both header fields are 0.
The explorer shows the description in the module’s summary, and uses both tables to name the entry points in the code.