sharedobjs

package
v0.0.0-...-ee04d3f Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamicSymbolsLoader

type DynamicSymbolsLoader interface {
	GetDynamicSymbols(info ObjInfo) (map[string]bool, error)
	GetExportedSymbols(info ObjInfo) (map[string]bool, error)
	GetImportedSymbols(info ObjInfo) (map[string]bool, error)
	GetLocalSymbols(info ObjInfo) (map[string]bool, error)
}

type HostSymbolsLoader

type HostSymbolsLoader struct {
	// contains filtered or unexported fields
}

HostSymbolsLoader is responsible for efficient reading of shared object's symbols. The logic of the loader here is used on absolute paths, so container relative paths won't work here. This object operation requires the CAP_DAC_OVERRIDE to access files across the system.

func InitHostSymbolsLoader

func InitHostSymbolsLoader(cacheSize int) *HostSymbolsLoader

func (*HostSymbolsLoader) GetDynamicSymbols

func (soLoader *HostSymbolsLoader) GetDynamicSymbols(soInfo ObjInfo) (map[string]bool, error)

GetDynamicSymbols try to get shared objects dynamic symbols from lru, and if fails read needed information from ELF file.

func (*HostSymbolsLoader) GetExportedSymbols

func (soLoader *HostSymbolsLoader) GetExportedSymbols(soInfo ObjInfo) (map[string]bool, error)

GetExportedSymbols try to get shared objects exported symbols from lru, and if fails read needed information from ELF file. The returned map is part of a cache, so if the user wants to modify it he should copy it and modify it there.

func (*HostSymbolsLoader) GetImportedSymbols

func (soLoader *HostSymbolsLoader) GetImportedSymbols(soInfo ObjInfo) (map[string]bool, error)

GetImportedSymbols try to get shared objects imported symbols from lru, and if fails read needed information from ELF file. The returned map is part of a cache, so if the user wants to modify it he should copy it and modify it there.

func (*HostSymbolsLoader) GetLocalSymbols

func (soLoader *HostSymbolsLoader) GetLocalSymbols(soInfo ObjInfo) (map[string]bool, error)

type ObjID

type ObjID struct {
	Inode  uint64
	Device uint32
	Ctime  uint64
}

ObjID is the unique identification of a SO in the system

type ObjInfo

type ObjInfo struct {
	Id      ObjID
	Path    string
	MountNS uint32
}

ObjInfo is the information of an SO needed to examine it

type Symbols

type Symbols struct {
	Exported map[string]bool
	Imported map[string]bool
	Local    map[string]bool
}

func NewSOSymbols

func NewSOSymbols() Symbols

type UnsupportedFileError

type UnsupportedFileError struct {
	// contains filtered or unexported fields
}

func InitUnsupportedFileError

func InitUnsupportedFileError(err error) *UnsupportedFileError

func (*UnsupportedFileError) Error

func (fileTypeErr *UnsupportedFileError) Error() string

func (*UnsupportedFileError) Unwrap

func (fileTypeErr *UnsupportedFileError) Unwrap() error

Jump to

Keyboard shortcuts

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