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

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

A0 <strong>OMF</strong> extensions This class consists of a set of records, identified by<br />

subtype (first byte of commentary string). Values<br />

supported by some linkers are:<br />

01 IMPDEF Import definition record. See the IMPDEF section for a<br />

complete description.<br />

02 EXPDEF Export definition record. See the EXPDEF section for a<br />

complete description.<br />

03 INCDEF Incremental compilation record. See the INCDEF section<br />

for a complete description.<br />

04 Protected<br />

memory<br />

library<br />

32-bit linkers only; relevant only to 32-bit dynamic-link<br />

libraries (DLLs). This comment record is inserted in an<br />

object module by the compiler when it encounters the<br />

_loadds construct in the source code for a DLL. The linker<br />

then sets a flag in the header of the executable file (DLL)<br />

to indicate that the DLL should be loaded in such a way<br />

that its shared data is protected from corruption. The<br />

_loadds keyword tells the compiler to emit modified<br />

function prolog code, which loads the DS segment<br />

register. (Normal functions don't need this.)<br />

When the flag is set in the .EXE header, the loader loads<br />

the selector of a protected memory area into DS while<br />

performing run-time fixups (relocations). All other DLLs<br />

and applications get the regular DGROUP selector, which<br />

doesn't allow access to the protected memory area set up<br />

by the operating system.<br />

05 LNKDIR Microsoft C++ linker directives record. See the LNKDIR<br />

section for a complete description.<br />

06 Big-endian The target for this <strong>OMF</strong> is a big-endian machine, as<br />

opposed to little-endian. "Big-endian" describes an<br />

architecture for which the most significant byte of a<br />

multibyte value has the smallest address. "Little-endian"<br />

describes an architecture for which the least significant<br />

byte of a multibyte value has the smallest address.<br />

07 PRECOMP When the Microsoft symbol and type information for this<br />

object file is emitted, the directory entry for $$TYPES is to<br />

be emitted as sstPreComp instead of sstTypes.<br />

08-<br />

FF<br />

Reserved.<br />

Note: The presence of any unrecognized subtype causes the linker to<br />

generate a fatal error.<br />

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

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

Saved successfully!

Ooh no, something went wrong!