Figure 20. Fixup Block Format
To apply a fixup, a delta needs to be calculated. The 32-bit delta
is the difference between the preferred base, and the base where the
image is actually loaded. If the image is loaded at its preferred
base, the delta would be zero, and thus the fixups would not have to
be applied. Each block must start on a DWORD boundary. The ABSOLUTE
fixup type can be used to pad a block.
PAGE RVA = DD Page RVA. The image base plus the page rva is added to
each offset to create the virtual address of where the fixup needs to
BLOCK SIZE = DD Number of bytes in the fixup block. This includes the
PAGE RVA and SIZE fields.
TYPE/OFFSET is defined as:
1 1 0
Figure 21. Fixup Record Format
TYPE = 4-bit fixup type. This value has the following definitions:
o 0h __ABSOLUTE. This is a NOP. The fixup is skipped.
o 1h __HIGH. Add the high 16-bits of the delta to the 16-bit field
at Offset. The 16-bit field represents the high value of a 32-
o 2h __LOW. Add the low 16-bits of the delta to the 16-bit field
at Offset. The 16-bit field represents the low half value of a
32-bit word. This fixup will only be emitted for a RISC machine
when the image Object Align isn't the default of 64K.
o 3h __HIGHLOW. Apply the 32-bit delta to the 32-bit field at
o 4h __HIGHADJUST. This fixup requires a full 32-bit value. The
high 16-bits is located at Offset, and the low 16-bits is
located in the next Offset array element (this array element is
included in the SIZE field). The two need to be combined into a
signed variable. Add the 32-bit delta. Then add 0x8000 and
store the high 16-bits of the signed variable to the 16-bit
field at Offset.
o 5h __MIPSJMPADDR.
All other values are reserved.