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 />

Allocation Type (Low-Order 4 bits):<br />

Bit<br />

Allocation<br />

00H Explicit Allocate in the segment specified in the ensuing Base Group, Base Segment,<br />

and Base Frame fields.<br />

01H Far Code Allocate as CODE16. The linker will create segments to contain all COMDATs<br />

of this type.<br />

02H Far Data Allocate as DATA16. The linker will create segments to contain all COMDATs<br />

of this type.<br />

03H Code32 Allocate as CODE32. The linker will create segments to contain all COMDATs<br />

of this type.<br />

04H Data32 Allocate as DATA32. The linker will create segments to contain all COMDATs<br />

of this type.<br />

05H - 0FH<br />

Reserved.<br />

Align Field<br />

These codes are based on the ones used by the SEGDEF record:<br />

0 Use value from SEGDEF<br />

1 Byte aligned<br />

2 Word aligned<br />

3 Paragraph (16 byte) aligned<br />

4 Page aligned. (The original Intel specification uses<br />

256-byte pages, the IBM <strong>OMF</strong> implementation uses<br />

4096-byte pages.)<br />

5 Double word (4 byte) aligned<br />

6 Not defined<br />

7 Not defined<br />

Enumerated Data Offset Field<br />

This field specifies an offset relative to the beginning location of the symbol specified in the Public Name Index<br />

field and defines the relative location of the first byte of the Data field. Successive data bytes in the Data field<br />

occupy higher locations of memory. This works very much like the Enumerated Data Offset field in an LEDATA<br />

record, but instead of an offset relative to a segment, this is relative to the beginning of the COMDAT symbol.<br />

Type Index Field<br />

The Type Index field is encoded in index format; it contains either debug information or an old-style TYPDEF<br />

index. If this index is 0, there is no associated type data. Old-style TYPDEF indexes are ignored by most linkers.<br />

Linkers do not perform type checking.<br />

Public Base Field<br />

This field is conditional and is identical to the public base fields (Base Group, Base Segment, and Base Frame)<br />

stored in the PUBDEF record. This field is present only if the Allocation Type field specifies Explicit allocation.<br />

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

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

Saved successfully!

Ooh no, something went wrong!