Class GoApiSnapshot

java.lang.Object
ghidra.app.util.bin.format.golang.rtti.GoApiSnapshot

public class GoApiSnapshot extends Object
Contains function definitions and type information found in a specific Golang runtime toolchain version.

Useful to apply function parameter information to functions found in a go binary.

Snapshot json files contain function / type information about functions and types extracted from the golang toolchain itself, for each arch and OSes that the golang toolchain supports, via cross-compiling against each GOARCH and GOOS.

Function and type info that is incompatible or not present in other arch / os targets will be split into different arch lookup keys that can be specified when deserializing the json.

The arch names will be one of "all", cpu-arch-name (eg. amd64), operating-system-name (eg. linux), operating-system-cpu-arch-name (eg. linux-amd64), or "unix" (artificial arch name that indicates the sub-elements are common to all unix-like arches).

Non-exhaustive list of current values:

  • all - everything that is generically compatible with all platforms
  • 386
  • amd64
  • arm
  • arm64
  • cgo
  • darwin
  • darwin-amd64
  • darwin-amd64-cgo
  • darwin-arm64
  • darwin-arm64-cgo
  • linux
  • linux-386
  • linux-386-cgo
  • linux-amd64
  • linux-amd64-cgo
  • linux-arm
  • linux-arm-cgo
  • linux-arm64
  • linux-arm64-cgo
  • linux-cgo
  • unix - an artificial goos that groups linux/bsd/darwin/aix/etc together
  • windows
  • windows-386
  • windows-386-cgo
  • windows-amd64
  • windows-amd64-cgo