Class LibObjcOptimization
java.lang.Object
ghidra.app.util.bin.format.macho.dyld.LibObjcOptimization
- All Implemented Interfaces:
StructConverter
Represents a objc_opt_t structure, which resides in the libobjc DYLIB within a DYLD cache
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the section that contains the objc_opt_t_structure -
Constructor Summary
ConstructorDescriptionLibObjcOptimization
(Program program, Address objcOptRoSectionAddr) Create a newLibObjcOptimization
. -
Method Summary
Modifier and TypeMethodDescriptionlong
getAddr()
Gets the address of the objc_opt_t structurelong
Gets the relative method selector base address offset.void
markup
(Program program, AddressSpace space, MessageLog log, TaskMonitor monitor) Marks up up this structure in memoryReturns a structure datatype representing the contents of the implementor of this interface.
-
Field Details
-
SECTION_NAME
The name of the section that contains the objc_opt_t_structure- See Also:
-
-
Constructor Details
-
LibObjcOptimization
Create a newLibObjcOptimization
.- Parameters:
program
- TheProgram
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
Marks up up this structure in memory- Parameters:
program
- TheProgram
space
- TheAddressSpace
log
- The logmonitor
- A cancelable task monitor
-
toDataType
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 interfaceStructConverter
- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException
- when a datatype of the same name already existsIOException
- if an IO-related error occurs- See Also:
-