Provides information about formatting offsets, absolute addresses, or their parts. Offset format is used by both RelocEntry and Fixup. The illustration below describes the relation of region size and offset size. Region size is the size of the whole unit whereas offset size is the size of the unit that will be patched.
+-> Code buffer | The subject of the relocation (region) |
| | (Word-Offset) (Word-Size) |
|xxxxxxxxxxxxxxx|................|*PATCHED*|................|xxxxxxxxxxxx->
| |
[Word Offset points here]----+ +--- [WordOffset + WordSize]
Once the offset word has been located it can be patched like this:
|ImmDiscardLSB (discard LSB bits).
|..
[0000000000000iiiiiiiiiiiiiiiiiDD] - Offset value (32-bit)
[000000000000000iiiiiiiiiiiiiiiii] - Offset value after discard LSB.
[00000000000iiiiiiiiiiiiiiiii0000] - Offset value shifted by ImmBitShift.
[xxxxxxxxxxxiiiiiiiiiiiiiiiiixxxx] - Patched word (32-bit)
|...............|
(ImmBitCount) +- ImmBitShift