buildid

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTextSectionNotFound = errors.New("could not find .text section")

Functions

func FromELF added in v0.20.0

func FromELF(ef *elf.File) (string, error)

FromELF returns the build ID for an ELF binary.

func FromFile added in v0.20.0

func FromFile(f *os.File) (id string, err error)

FromFile reads the build ID from a binary by opening the file, but only reading the first 32 kB of the file. It also treats Go binaries specially, reading the build ID from designated sections. ELF binaries store the build ID in a proper PT_NOTE section.

Types

This section is empty.

Jump to

Keyboard shortcuts

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