Package ghidra.app.util.bin.format.pef
Class LoaderRelocationHeader
- java.lang.Object
-
- ghidra.app.util.bin.format.pef.LoaderRelocationHeader
-
- All Implemented Interfaces:
StructConverter
public class LoaderRelocationHeader extends java.lang.Object implements StructConverter
See Apple's -- PEFBinaryFormat.hstruct PEFLoaderRelocationHeader { UInt16 sectionIndex; // Index of the section to be fixed up. UInt16 reservedA; // Reserved, must be zero. UInt32 relocCount; // Number of 16 bit relocation chunks. UInt32 firstRelocOffset; // Offset of first relocation instruction. }; typedef UInt16 PEFRelocChunk;
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getFirstRelocOffset()
The firstRelocOffset field (4 bytes) indicates the byte offset from the start of the relocations area to the first relocation instruction for this section.java.util.List<Relocation>
getRelocations()
int
getRelocCount()
The relocCount field (4 bytes) indicates the number of 16-bit relocation blocks for this section.short
getReservedA()
Reserved, must be set to zero (0).short
getSectionIndex()
The sectionIndex field (2 bytes) designates the section number to which this relocation header refers.DataType
toDataType()
Returns a structure datatype representing the contents of the implementor of this interface.
-
-
-
Method Detail
-
getSectionIndex
public short getSectionIndex()
The sectionIndex field (2 bytes) designates the section number to which this relocation header refers.- Returns:
- section number to which this relocation header refers
-
getReservedA
public short getReservedA()
Reserved, must be set to zero (0).- Returns:
- reserved, must be set to zero (0)
-
getRelocCount
public int getRelocCount()
The relocCount field (4 bytes) indicates the number of 16-bit relocation blocks for this section.- Returns:
- number of 16-bit relocation blocks for this section
-
getFirstRelocOffset
public int getFirstRelocOffset()
The firstRelocOffset field (4 bytes) indicates the byte offset from the start of the relocations area to the first relocation instruction for this section.- Returns:
- offset from the start of the relocations area to the first relocation
-
getRelocations
public java.util.List<Relocation> getRelocations()
-
toDataType
public DataType toDataType() throws DuplicateNameException, java.io.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 interfaceStructConverter
- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException
- when a datatype of the same name already existsjava.io.IOException
- See Also:
StructureDataType
-
-