Relocatable Object Module Format (OMF) Specification
Relocatable Object Module Format (OMF) Specification
Relocatable Object Module Format (OMF) Specification
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Relocatable</strong> <strong>Object</strong> <strong>Module</strong> <strong>Format</strong><br />
Segment Length Field<br />
The Segment Length field is a 2- or 4-byte numeric quantity and specifies the number of bytes in this program<br />
segment. For record type 98H, the length can be from 0 to 64K; if a segment is exactly 64K, the segment length<br />
should be 0, and the B field in the ACBP byte should be 1. For record type 99H, the length can be from 0 to 4 GB;<br />
if a segment is exactly 4 GB in size, the segment length should be 0 and the B field in the ACBP byte should be 1.<br />
Segment Name Index, Class Name Index, Overlay Name Index Fields<br />
The three name indexes (Segment Name Index, Class Name Index, and Overlay Name Index) refer to names that<br />
appeared in previous LNAMES record(s). The linker ignores the Overlay Name Index field. The full name of a<br />
segment consists of the segment and class names, and segments in different object modules are normally<br />
combined according to the A and C values if their full names are identical. These indexes must be nonzero,<br />
although the name itself may be null.<br />
The Segment Name Index field identifies the segment with a name. The name need not be unique—other<br />
segments of the same name will be concatenated onto the first segment with that name. The name may have<br />
been assigned by the programmer, or it may have been generated by a compiler.<br />
The Class Name Index field identifies the segment with a class name (such as CODE, FAR_DATA, or STACK).<br />
The linker places segments with the same class name into a contiguous area of memory in the run-time memory<br />
map.<br />
The Overlay Name Index field identifies the segment with a run-time overlay. It is ignored by many linkers.<br />
Notes<br />
Many linkers impose a limit of 255 SEGDEF records per object module.<br />
Certain name/class combinations are reserved for debug information and have special significance to<br />
the linker, such as $$TYPES and $$SYMBOLS. See Appendix 1 for more information.<br />
Conflicts: The TIS-defined <strong>OMF</strong> has Use16/Use32 stored as the P bit of the ACBP field. The P bit<br />
does not specify the access for the segment. For Microsoft LINK the access is specified in the .DEF<br />
file.<br />
Tool Interface Standards (TIS) <strong>OMF</strong> <strong>Specification</strong>, Version 1.1 39