Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
A complex offset expression looks like
        offset target + delta - offset base
It is specified by:
        - type (OFF16, OFF32, LOW16, etc.)
        - base
        - optional target
        - optional delta from target
The relationship between these parameters is (the formula is given for full offsets):
        operand_value = target + delta - base
  or (the same relationship in a different form):
        target = operand_value - delta + base
You always have to specify the offset type and base. Usually, the delta is equal to zero. For the full offset type you may omit the offset target, which is recommended. In this case, IDA will calculate it automatically. However, if you specify the offset target, make sure that the relationship between the parameters still holds. For the half offset types, you have to specify the target because there is no way to calculate it.

The offset types:

  8-bit full offset            :
  16-bit full offset           :
  32-bit full offset           :
    The full offsets are regular offset expressions like
        offset label
    They can occupy 8, 16, or 32 bits.
    You have to specify the offset base for these offsets.
  low 8 bits of 16-bit offset  :
    Only the low 8 bits of the offset. IDA will represent them as
        (offset label) & 0xFF
  low 16 bits of 32-bit offset :
    Only the low 16 bits of the offset. IDA will represent them as
        (offset label) & 0xFFFF
  high 8 bits of 16-bit offset :
    Only the high 8 bits of the offset. IDA will represent them as
        offset label >> 8
  high 16 bits of 32-bit offset:
    Only the high 17 bits of the offset. IDA will represent them as
        offset label >> 16
See also offset by any user-specified base
Index | Previous topic | Next topic