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

94H or 95H LINNUM—Line Numbers Record<br />

Description<br />

The LINNUM record relates line numbers in source code to addresses in object code.<br />

History<br />

Record type 95H is added for 32-bit linkers; allowing for 32-bit debugger style-specific information.<br />

Note: For instantiated inline functions in Microsoft C 7.0, line numbers are output in LINSYM records<br />

with a reference to the function name instead of the segment.<br />

Record <strong>Format</strong><br />

1 2 1 or 2 1 or 2 1<br />

94 Record Base Base Debugger Checksum<br />

or 95 Length Group Segment Style-specific<br />

Information<br />

<br />

Base Group and Base Segment Fields<br />

The Base Group and Base Segment fields contain indexes specifying previously defined GRPDEF and SEGDEF<br />

records.<br />

Notes<br />

The debugger style-specific information is indicated by comment class A1.<br />

Although the complete Intel 8086 specification allows the Base Group and Base Segment fields to refer<br />

to a group or to an absolute segment as well as to a relocatable segment, some linkers commonly<br />

restrict references in this field to relocatable segments.<br />

The following discussion uses the Microsoft debugger style-specific information. The debugger stylespecific<br />

information field in the LINNUM record is composed as follows:<br />

2 2 or 4<br />

Line<br />

Number<br />

Line Number<br />

Offset<br />

<br />

For Microsoft LINK LINNUM records, the Line Number field contains a 16-bit quantity, in the range 0<br />

through 7FFF and is, as its name indicates, a line number in the source code. The Line Number Offset<br />

field contains a 2-byte or 4-byte quantity that gives the translated code or data's start byte in the<br />

program segment defined by the SEGDEF index (4 bytes if the record type is 95H; 2 bytes for type<br />

94H).<br />

The Line Number and Line Number Offset fields can be repeated, so a single LINNUM record can<br />

specify multiple line numbers in the same segment.<br />

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

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

Saved successfully!

Ooh no, something went wrong!