Package ghidra.app.util.bin.format.pef

# Class RelocByIndexGroup

java.lang.Object
ghidra.app.util.bin.format.pef.Relocation
ghidra.app.util.bin.format.pef.RelocByIndexGroup

All Implemented Interfaces:
  `StructConverter`

public class RelocByIndexGroup extends Relocation
See Apple's -- PEFBinaryFormat.h

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `kPEFRelocSmByImport`
  This "RelocSmByImport" (SYMB) instruction adds the address of the imported symbol whose index is held in `index` to the word pointed to by `relocAddress`.
  `static final int`
  `kPEFRelocSmBySection`
  This "RelocSmBySection" (SECN) instruction adds the address of the instantiated section specified by `index` to the word pointed to by `relocAddress`.
  `static final int`
  `kPEFRelocSmSetSectC`
  This "RelocSmSetSectC" (CDIS) instruction sets the variable `sectionC` to the memory address of the instantiated section specified by `index`.
  `static final int`
  `kPEFRelocSmSetSectD`
  This "RelocSmSetSectD" (DTIS) instruction sets the variable `sectionD` to the memory adddress of the instantiated section specified by `index`.

  ### Fields inherited from class ghidra.app.util.bin.format.pef.Relocation

  `opcode`

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `apply(ImportStateCache importState, RelocationState relocState, ContainerHeader header, Program program, MessageLog log, TaskMonitor monitor)`
  `int`
  `getIndex()`
  `int`
  `getSubopcode()`
  `boolean`
  `isMatch()`
  `String`
  `toString()`

  ### Methods inherited from class ghidra.app.util.bin.format.pef.Relocation

  `getOpcode, getRepeatChunks, getRepeatCount, getSizeInBytes, toDataType`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### kPEFRelocSmByImport

    public static final int kPEFRelocSmByImport
    This "RelocSmByImport" (SYMB) instruction adds the address of the imported symbol whose index is held in `index` to the word pointed to by `relocAddress`. After the addition, `relocAddress` points to just past the modified word, and `importindex` is set to `index+1`.
    See Also:
      - Constant Field Values

  - ### kPEFRelocSmSetSectC

    public static final int kPEFRelocSmSetSectC
    This "RelocSmSetSectC" (CDIS) instruction sets the variable `sectionC` to the memory address of the instantiated section specified by `index`.
    See Also:
      - Constant Field Values

  - ### kPEFRelocSmSetSectD

    public static final int kPEFRelocSmSetSectD
    This "RelocSmSetSectD" (DTIS) instruction sets the variable `sectionD` to the memory adddress of the instantiated section specified by `index`.
    See Also:
      - Constant Field Values

  - ### kPEFRelocSmBySection

    public static final int kPEFRelocSmBySection
    This "RelocSmBySection" (SECN) instruction adds the address of the instantiated section specified by `index` to the word pointed to by `relocAddress`. After execution, `relocAddress` points to just past the modified word.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### isMatch

    public boolean isMatch()
    Specified by:
      `isMatch` in class `Relocation`

  - ### getSubopcode

    public int getSubopcode()

  - ### getIndex

    public int getIndex()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Relocation`

  - ### apply

    public void apply(ImportStateCache importState, RelocationState relocState, ContainerHeader header, Program program, MessageLog log, TaskMonitor monitor)
    Specified by:
      `apply` in class `Relocation`