Class GoBuildInfo
java.lang.Object
ghidra.app.util.bin.format.golang.GoBuildInfo
- All Implemented Interfaces:
ElfInfoItem
A program section that contains Go build information strings, namely go module package names,
go module dependencies, and build/compiler flags, as well as the golang version itself.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.app.util.bin.format.elf.info.ElfInfoItem
ElfInfoItem.ItemWithAddress<T>, ElfInfoItem.ReaderFunc<T extends ElfInfoItem> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddecorateProgramInfo(Options props) findBuildInfo(Program program) Searches for the GoBuildInfo structure in the most common and easy locations.static GoBuildInfofromProgram(Program program) Reads a GoBuildInfo ".go.buildinfo" section from the specified Program, if present.getPath()intstatic booleanisPresent(InputStream is) Probes the specified InputStream and returns true if it starts with a go buildinfo magic signature.voidmarkupProgram(Program program, Address address) Markup a program's info and memory with this item.static GoBuildInforead(BinaryReader reader, Program program) Reads a GoBuildInfo ".go.buildinfo" section from the specified stream.toString()
-
Field Details
-
SECTION_NAME
- See Also:
-
-
Method Details
-
fromProgram
Reads a GoBuildInfo ".go.buildinfo" section from the specified Program, if present.- Parameters:
program-Programthat contains the ".go.buildinfo" section- Returns:
- new
GoBuildInfoinstance, if present, null if missing or error
-
findBuildInfo
Searches for the GoBuildInfo structure in the most common and easy locations.- Parameters:
program-Programto search- Returns:
- new
GoBuildInfoinstance, if present, null if missing or error
-
read
Reads a GoBuildInfo ".go.buildinfo" section from the specified stream.- Parameters:
reader- BinaryReader that contains the ".go.buildinfo" sectionprogram- Program that contains the ".go.buildinfo" section- Returns:
- new
GoBuildInfoinstance, never null - Throws:
IOException- if error reading or bad data
-
isPresent
Probes the specified InputStream and returns true if it starts with a go buildinfo magic signature.- Parameters:
is- InputStream- Returns:
- true if starts with buildinfo magic signature
-
getPointerSize
public int getPointerSize() -
getEndian
-
getVersion
-
getVerEnum
-
getPath
-
getModuleInfo
-
getDependencies
-
getBuildSettings
-
markupProgram
Description copied from interface:ElfInfoItemMarkup a program's info and memory with this item.- Specified by:
markupProgramin interfaceElfInfoItem- Parameters:
program-Programto markupaddress-Addressof the item in the program
-
decorateProgramInfo
-
toString
-