container

package
v0.0.1-rc9 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BTFContainer

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

BTFContainer 用于解析和存储 eBPF 程序中的 BTF 信息

func NewBTFContainerFromBinary

func NewBTFContainerFromBinary(elfData []byte) (*BTFContainer, error)

NewBTFContainerFromBinary 从 eBPF ELF 二进制数据创建 BTF 容器

func (*BTFContainer) GetElfContainer

func (b *BTFContainer) GetElfContainer() *ElfContainer

GetElfContainer 获取 ELF 容器

func (*BTFContainer) GetSpec

func (b *BTFContainer) GetSpec() *btf.Spec

GetSpec 获取 BTF 规范

type ElfContainer

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

ElfContainer ELF容器 用于解决 ELF 文件引用问题的辅助结构体 包含原始 ELF 文件的二进制数据和 ELF 文件结构

func NewElfContainerFromBinary

func NewElfContainerFromBinary(bin []byte) (*ElfContainer, error)

NewElfContainerFromBinary 从二进制数据创建 ELF 容器

func (*ElfContainer) Binary

func (e *ElfContainer) Binary() []byte

Binary 获取原始二进制数据

func (*ElfContainer) Close

func (e *ElfContainer) Close() error

Close 关闭并清理资源

func (*ElfContainer) File

func (e *ElfContainer) File() *elf.File

File 获取 ELF 文件结构

func (*ElfContainer) GetElfInfo

func (e *ElfContainer) GetElfInfo() map[string]interface{}

GetElfInfo 获取 ELF 文件的基本信息

func (*ElfContainer) GetSections

func (e *ElfContainer) GetSections() []map[string]interface{}

GetSections 获取所有段信息

func (*ElfContainer) GetSymbols

func (e *ElfContainer) GetSymbols() ([]map[string]interface{}, error)

GetSymbols 获取所有符号信息

func (*ElfContainer) Reader

func (e *ElfContainer) Reader() io.ReaderAt

Reader 获取二进制数据读取器

func (*ElfContainer) Reset

func (e *ElfContainer) Reset()

Reset 重置读取器位置

Jump to

Keyboard shortcuts

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