elfreader

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFunctionRetOffsets

func GetFunctionRetOffsets(elfFile string, fnName string) ([]uint64, error)

GetFunctionRetOffsets returns the list of offsets where RET instruction appear within the function. This code was taken from here: https://github.com/cfc4n/go_uretprobe_demo/blob/master/ret_offset.go#L22

Types

type ElfReader added in v0.9.4

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

func NewElfReader added in v0.9.4

func NewElfReader(filePath string) (*ElfReader, error)

NewElfReader opens an ELF file and returns the ElfReader struct.

func (*ElfReader) Close added in v0.9.4

func (e *ElfReader) Close()

Close closes the ElfReader file.

func (*ElfReader) FunctionSymbols added in v0.9.4

func (e *ElfReader) FunctionSymbols(pattern string) ([]string, error)

FunctionSymbols returns the list of function symbols within the ELF file.

Jump to

Keyboard shortcuts

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