1 byte 2 bytes ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂ--- ³ 9D ³ Record ³ ³ ³ Length ³ ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁ--- <--- from the record length ---> 1 byte --ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿ ³ THREAD subrecord or ³Chk Sum³ ³ FIXUP subrecord ³or 0 ³ --ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ <--------- repeated ------------>
These records convey the information needed to resolve and eventually relocate references between different object modules.
Each subrecord in a FIXUPP object record either defines a thread for subsequent use, or refers to a data location in the nearest previous LEDATA or LIDATA record. The high order bit of the subrecord determines the subrecord type: if the high order bit is 0, the subrecord is a THREAD subrecord; if the high order bit is 1, the subrecord is a FIXUP subrecord. Subrecords of different types may be mixed within one object record.
Information that determines how to resolve a reference can be specified explicitly in a FIXUP subrecord, or can be specified within a FIXUP subrecord by a reference to a previous THREAD subrecord. A THREAD subrecord describes only the method to be used by the linker to refer to a particular target or frame. Because the same THREAD can be referenced in several subsequent FIXUP subrecords, a FIXUPP object record that uses THREADs may be smaller than one in which THREADs are not used.
THREAD subrecords can be referenced in the same object record in which they
appear and also in subsequent FIXUPP object records.
THREAD
There are 4 frame threads and 4 target threads; not all need be defined and they can be redefined by later THREAD subrecords in the same or later FIXUPP object records. The frame threads are used to specify the Frame Datum field in a later FIXUP subrecord: the target threads are used to specify the Target Datum field in a later FIXUP subrecord.
A THREAD subrecord defines a thread, and does not require that a previous LEDATA or LIDATA record occur.
The layout of the THREAD subrecord is as follows:
<-------- one byte -----------> 1 or 2 bytes ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ 0 ³ D ³ 0 ³ METHOD ³THRED ³ Index ³ ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 1 1 1 3 bits 2 bits <--- conditional --->where:
D
For target threads, only the lower two bits of the field are used; the high-order bit of the method is derived from the P bit in the FixDat field of the FIXUP subrecords that refer to this thread. The full list of methods is given here for completeness. This field determines the kind of index required to specify the Target Datum.
For frame threads, the method field determines the Frame Datum field of subsequent FIXUP subrecords that refer to this thread. Values for the method field are:
A FIXUP subrecord gives the how/what/why/where/whoinformationrequiredtoconvertareferencewhenprogramsegmentsarecombinedorplacedwithinlogicalsegments . ItappliestothenearestpreviousLEDATAorLIDATArecord ,whichmustbedefinedbeforetheFIXUP .ThisFIXUPsubrecordisasfollows :
2 bytes 1 byte 1 or 2 1 or 2 4 bytes ÚÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ LOCAT ³ Fix ³ Frame ³ Target ³ Target ³ ³ ³ Dat ³ Datum ³ Datum ³ Displacement ³ ÀÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ <cond> <cond> <conditional>where the LOCAT field has an unusual format. Contrary to the usual byte order in Intel data structures, the most significant bits of the LOCAT field are found in the low-order, rather than the high-order byte.
The LOCAT field is:
<------ lo byte ------> <----- high byte -----> ÚÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄÂÄÄ¿ ³1 ³M ³ LOC ³ Data Record Offset ³ ÀÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÁÄÄÙ 1 1 4 10 (bits)where:
M
CONFLICT PharLap OMF uses LOC=5 to indicate a 32-bit offset, where Microsoft and IBM use LOC=9.
CONFLICT PharLap OMF uses LOC=6 to indicate a 48-bit pointer (16-bit base : 32-bit offset) where Microsoft and IBM use LOC=11.
ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿ ³ F ³ FRAME ³ T ³ P ³TARGT ³ ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ 1 3 1 1 2 (bits)and is interpreted as follows:
F
If F=0, the frame method (in the range F0 to F5) is explicitly defined in this FIXUP subrecord. The method is stored in the FRAME field.
If T=0 the target is specified explicitly in this FIXUP subrecord. In this case, the P bit and the TARGT field can be considered a 3-bit field analogous to the FRAME field.
If P=1 there is no displacement field.
If P=0, the displacement field is present.
FIXUPP records are used to fix references in the immediately preceding LEDATA, LIDATA or COMDAT record.
The FRAME is the translator'swayoftellingthelinkerthecontentsofthesegmentregisterusedforthereference ;theTARGETistheitembeingreferencedwhoseaddresswasnotcompletelyresolvedbythetranslator . Inprotectmode ,theonlylegalsegmentregistervalueareselectors ;everysegmentandgroupofsegmentsismappedthroughsomeselectorandaddressedbyoffsetwithintheunderlyingmemorydefinedbythatselector .