Class GoPcHeader
java.lang.Object
ghidra.app.util.bin.format.golang.rtti.GoPcHeader
A low-level structure embedded in golang binaries that contains useful bootstrapping
information.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AddressfindPclntabAddress(GoRttiMapper programContext, AddressRange range, TaskMonitor monitor) Searches (possibly slowly) for a pclntab structure in the specified memory range, which is typically necessary in stripped PE binaries.static AddressgetPclntabAddress(Program program) Returns theAddress(if present) of the go pclntab section or symbol.static booleanhasPclntab(Program program) Returns true if the specified program has an easily found pclntabstatic booleanisPclntab(ByteProvider provider) Returns true if there is a pclntab at the current position of the specified ByteProvider.
-
Field Details
-
GOPCLNTAB_SECTION_NAME
- See Also:
-
GO_1_2_MAGIC
public static final int GO_1_2_MAGIC- See Also:
-
GO_1_16_MAGIC
public static final int GO_1_16_MAGIC- See Also:
-
GO_1_18_MAGIC
public static final int GO_1_18_MAGIC- See Also:
-
-
Constructor Details
-
GoPcHeader
public GoPcHeader()
-
-
Method Details
-
getPclntabAddress
Returns theAddress(if present) of the go pclntab section or symbol. -
hasPclntab
Returns true if the specified program has an easily found pclntab- Parameters:
program-Program- Returns:
- boolean true if program has a pclntab, false otherwise
-
findPclntabAddress
public static Address findPclntabAddress(GoRttiMapper programContext, AddressRange range, TaskMonitor monitor) throws IOException Searches (possibly slowly) for a pclntab structure in the specified memory range, which is typically necessary in stripped PE binaries.- Parameters:
programContext-GoRttiMapperrange- memory range to search (typically .rdata or .noptrdata sections)monitor-TaskMonitorthat will let the user cancel- Returns:
Addressof the found pclntab structure, or null if not found- Throws:
IOException
-
isPclntab
Returns true if there is a pclntab at the current position of the specified ByteProvider.- Parameters:
provider-ByteProvider- Returns:
- boolean true if the byte provider has the magic signature of a pclntab
- Throws:
IOException
-
getGoVersion
-
getTextStart
-
getFuncnameAddress
-
getCuAddress
-
getFiletabAddress
-
getPctabAddress
-
getPclnAddress
-