Class LibObjcOptimization

java.lang.Object
ghidra.app.util.bin.format.macho.dyld.LibObjcOptimization
All Implemented Interfaces:
StructConverter

public class LibObjcOptimization extends Object implements StructConverter
Represents a objc_opt_t structure, which resides in the libobjc DYLIB within a DYLD cache
See Also:
  • Field Details

    • SECTION_NAME

      public static final String SECTION_NAME
      The name of the section that contains the objc_opt_t_structure
      See Also:
  • Constructor Details

    • LibObjcOptimization

      public LibObjcOptimization(Program program, Address objcOptRoSectionAddr) throws IOException
      Create a new LibObjcOptimization.
      Parameters:
      program - The Program
      objcOptRoSectionAddr - The start address of the __objc_opt_ro section
      Throws:
      IOException - if there was an IO-related problem parsing the structure
  • Method Details

    • getAddr

      public long getAddr()
      Gets the address of the objc_opt_t structure
      Returns:
      The address of the objc_opt_t structure
    • getRelativeSelectorBaseAddressOffset

      public long getRelativeSelectorBaseAddressOffset()
      Gets the relative method selector base address offset. This will be 0 if the version is less than 16.
      Returns:
      The relative method selector base address offset
    • markup

      public void markup(Program program, AddressSpace space, MessageLog log, TaskMonitor monitor)
      Marks up up this structure in memory
      Parameters:
      program - The Program
      space - The AddressSpace
      log - The log
      monitor - A cancelable task monitor
    • toDataType

      public DataType toDataType() throws DuplicateNameException, IOException
      Description copied from interface: StructConverter
      Returns a structure datatype representing the contents of the implementor of this interface.

      For example, given:

       class A {
           int foo;
           double bar;
       }
       

      The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

      Specified by:
      toDataType in interface StructConverter
      Returns:
      returns a structure datatype representing the implementor of this interface
      Throws:
      DuplicateNameException - when a datatype of the same name already exists
      IOException - if an IO-related error occurs
      See Also: