buildid

package
v0.0.0-...-8baa2bd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2018 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildIDReadSize = 32 * 1024 // changed for testing

Functions

func ReadBuildID

func ReadBuildID(name, target string) (id string, err error)

ReadBuildID reads the build ID from an archive or binary. It only supports the gc toolchain. Other toolchain maintainers should adjust this function.

func ReadBuildIDFromBinary

func ReadBuildIDFromBinary(filename string) (id string, err error)

ReadBuildIDFromBinary reads the build ID from a binary.

ELF binaries store the build ID in a proper PT_NOTE section.

Other binary formats are not so flexible. For those, the linker stores the build ID as non-instruction bytes at the very beginning of the text segment, which should appear near the beginning of the file. This is clumsy but fairly portable. Custom locations can be added for other binary types as needed, like we did for ELF.

func ReadELFNote

func ReadELFNote(filename, name string, typ int32) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL