elf

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package elf provides utility functions for manipulating ELF files on the filesystem.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreSymbolPrefixes

func IgnoreSymbolPrefixes(prefixes []string)

IgnoreSymbolPrefixes configures the ELF package to ignore symbols that have any of the specified prefixes. It must be called by only one thread at a time.

This slice will be iterated once per ELF.Write(), so try not to let it grow out of hand...

Types

type ELF

type ELF struct {

	// lock concurrent writes of the ELF. This library probably isn't far
	// off from allowing concurrent Write() execution, but it's just not
	// supported for now.
	lock.Mutex
	// contains filtered or unexported fields
}

ELF is an in-memory representation of a BPF ELF object from the filesystem.

func NewELF

func NewELF(ra io.ReaderAt, scopedLog *logrus.Entry) (*ELF, error)

NewELF returns a new object from the specified reader.

The ELF binary is expected to start at position 0 in the specified reader.

func