17.01.2015 Views

Relocatable Object Module Format (OMF) Specification

Relocatable Object Module Format (OMF) Specification

Relocatable Object Module Format (OMF) Specification

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Relocatable</strong> <strong>Object</strong> <strong>Module</strong> <strong>Format</strong><br />

Appendix 1: Microsoft Symbol and Type Extensions<br />

Microsoft symbol and type information is stored on a per-module basis in specially-named logical segments.<br />

These segments are defined in the usual way (SEGDEF records), but the linker handles them specially, and they<br />

do not end up as segments in the .EXE file. These segment names are reserved:<br />

Segment Name Class Name Combine Type<br />

$$TYPES DEBTYP Private<br />

$$SYMBOLS DEBSYM Private<br />

The segment $$IMPORT should also be considered a reserved name, although it is not used anymore. This<br />

segment was not part of any object files but was emitted by the linker to get the loader to automatically do fixups<br />

for Microsoft symbol and type information. The linker emitted a standard set of imports, not just ones referenced<br />

by the program being linked. Use of this segment may be revisited in the future.<br />

Microsoft symbol and type information-specific data is stored in LEDATA records for the $$TYPES and<br />

$$SYMBOLS segments, in various proprietary formats. The $$TYPES segment contains information on userdefined<br />

variable types; $$SYMBOLS contains information about nonpublic symbols: stack, local, procedure, block<br />

start, constant, and register symbols and code labels.<br />

For instantiated functions in Microsoft C 7.0, symbol information for Microsoft symbol and type information will be<br />

output in COMDAT records that refer to segment $$SYMBOLS and have decorated names based on the function<br />

names. Type information will still go into the $$TYPES segment in LEDATA records.<br />

All <strong>OMF</strong> records that specify a Type Index field, including EXTDEF, PUBDEF, and COMDEF records, use<br />

Microsoft symbol and type information values. Because many types are common, Type Index values in the range<br />

0 through 511 (1FFH) are reserved for a set of predefined primitive types. Indexes in the range 512 through<br />

32767 (200H-7FFFH) index into the set of type definitions in the module's $$TYPES segment, offset by 512. Thus<br />

512 is the first new type, 513 the second, and so on.<br />

Tool Interface Standards (TIS) <strong>OMF</strong> <strong>Specification</strong>, Version 1.1 71

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!