Documentation ¶
Overview ¶
Package build is used to help build data for kbuild.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoVersion ¶
GoVersion returns gotool's version in the form goX.Y, provided gotool is the path to the Go tool.
func OverrideEnv ¶
OverrideEnv takes the current environ and a set of overrides. OverrideEnv ensures that the variables in overrides are set, with their corresponding values, whether they appear in the original environ or not. OverrideEnv does not modify environ.
Typical use:
env := OverrideEnv(os.Environ(), "GOOS=linux", "GOARCH=amd64")
func WriteOffsets ¶
WriteOffsets writes entries to name, in the form of a Go file containing the entry data.
Types ¶
type Entry ¶
Entry maps a symbol name to a memory offset.
func DeriveOffsets ¶
DeriveOffsets returns the offsets in memory for the important parts of a Go binary for a given version.
The gotool should be a path to the Go tool. The goversion should be the Go version supported by gotool, in the form "goX.Y". The goarch should be the chosen machine architecture. The goarch must be a valid value for GOARCH, supported by Linux, according to `gotool tool dist list`.