6.2.7 Entry Table

The entry table contains bundles of entry points from the executable file (the linker generates each bundle). The numbering system for these ordinal values is 1-based—that is, the ordinal value corresponding to the first entry point is 1.

The linker generates the densest possible bundles under the restriction that it cannot reorder the entry points. This restriction is necessary because other executable files may refer to entry points within a given bundle by their ordinal values.

The entry-table data is organized by bundle, each of which begins with a 2-byte header. The first byte of the header specifies the number of entries in the bundle (a value of 00h designates the end of the table). The second byte specifies whether the corresponding segment is movable or fixed. If the value in this byte is 0FFh, the segment is movable. If the value in this byte is 0FEh, the entry does not refer to a segment but refers, instead, to a constant defined within the module. If the value in this byte is neither 0FFh nor 0FEh, it is a segment index.

For movable segments, each entry consists of 6 bytes and has the following form:

Location Description

00h Specifies a byte value. This value can be a combination of the following bits:
Bit(s) Meaning

0 If this bit is set, the entry is exported.
1 If this bit is set, the segment uses a global (shared) data segment.
3–7 If the executable file contains code that performs ring transitions, these bits specify the number of words that compose the stack. At the time of the ring transition, these words must be copied from one ring to the other.

01h Specifies an int 3fh instruction.
03h Specifies the segment number.
04h Specifies the segment offset.

For fixed segments, each entry consists of 3 bytes and has the following form:

Location Description

00h Specifies a byte value. This value can be a combination of the following bits:
Bit(s) Meaning

0 If this bit is set, the entry is exported.
1 If this bit is set, the entry uses a global (shared) data segment. (This may be set only for SINGLEDATA library modules.)
3–7 If the executable file contains code that performs ring transitions, these bits specify the number of words that compose the stack. At the time of the ring transition, these words must be copied from one ring to the other.

01h Specifies an offset.