kallsyms

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address added in v0.17.0

func Address(symbol string) (uint64, error)

Address returns the address of the given symbol in the kernel. Returns 0 and no error if the symbol is not present. Returns an error if multiple addresses were found for a symbol.

Consider AssignAddresses if you need to resolve multiple symbols, as it will only perform one iteration over /proc/kallsyms.

func AssignAddresses added in v0.17.0

func AssignAddresses(symbols map[string]uint64) error

AssignAddresses looks up the addresses of the requested symbols in the kernel and assigns them to their corresponding values in the symbols map. Results of all lookups are cached, successful or otherwise.

Any symbols missing in the kernel are ignored. Returns an error if multiple addresses were found for a symbol.

func AssignModules added in v0.17.0

func AssignModules(symbols map[string]string) error

AssignModules looks up the kernel module providing each given symbol, if any, and assigns them to their corresponding values in the symbols map. Only function symbols are considered. Results of all lookups are cached, successful or otherwise.

Any symbols missing in the kernel are ignored. Returns an error if multiple symbols with a given name were found.

func Module added in v0.17.0

func Module(name string) (string, error)

Module returns the kernel module providing the given symbol in the kernel, if any. Returns an empty string and no error if the symbol is not present in the kernel. Only function symbols are considered. Returns an error if multiple symbols with the same name were found.

Consider AssignModules if you need to resolve multiple symbols, as it will only perform one iteration over /proc/kallsyms.

Types

This section is empty.

Jump to

Keyboard shortcuts

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