runtime

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAddressOfSymbol added in v0.24.0

func FindAddressOfSymbol(ef *elf.File, symbol string) (uint64, error)

TODO: Optimize! FindAddressOfSymbol finds the address of the given symbol in the given elf file by searching both the symbol table and the dynamic symbol table. Returns 0 if the symbol is not found.

func FindSymbol added in v0.24.0

func FindSymbol(ef *elf.File, symbol string) (*elf.Symbol, error)

FindSymbol finds symbol by name in the given elf file.

func HasSymbols added in v0.27.0

func HasSymbols(ef *elf.File, matches [][]byte) (bool, error)

func IsSymbolNameInDynamicSymbols added in v0.23.3

func IsSymbolNameInDynamicSymbols(f *elf.File, matches [][]byte) (bool, error)

ForEachElfSymbolNameInSymbols iterates over the symbols in the dynamic symbol table of the given elf file. It calls the given function for each symbol name. The value is only valid for the iteration, it must not be saved unless copied.

func IsSymbolNameInSymbols added in v0.23.3

func IsSymbolNameInSymbols(f *elf.File, matches [][]byte) (bool, error)

ForEachElfSymbolNameInSymbols iterates over the symbols in the symbol table of the given elf file. It calls the given function for each symbol name. The value is only valid for the iteration, it must not be saved unless copied.

func IsV8 added in v0.23.3

func IsV8(f *elf.File) (bool, error)

HACK: This is a somewhat a brittle check.

func ReadStringAtAddress added in v0.24.0

func ReadStringAtAddress(rs io.ReadSeeker, address, size uint64) (string, error)

ReadStringAtAddress reads a null-terminated string from the given address in the given elf file.

Types

type Interpreter added in v0.24.0

type Interpreter struct {
	Type    InterpreterType
	Version *semver.Version
	// The address of the main thread state for Python.
	MainThreadAddress  uint64
	InterpreterAddress uint64
}

type InterpreterType added in v0.24.0

type InterpreterType uint64
const (
	InterpreterNone InterpreterType = iota
	InterpreterRuby
	InterpreterPython
)

func (InterpreterType) String added in v0.24.0

func (it InterpreterType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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