elf

package
v0.0.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SymbolNotFoundError     = errors.New("symbol not found")
	DIENotFoundError        = errors.New("DIE not found")
	FramePointerNotFound    = errors.New("fp not found")
	ReturnNotFound          = errors.New("return not found")
	PcRangeTooLargeErr      = errors.New("PC range too large")
	FramePointerNotFoundErr = errors.New("framepointer not found")
	RetNotFoundErr          = errors.New("ret not found")
)

Functions

This section is empty.

Types

type ELF

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

func New

func New(bin string) (_ *ELF, err error)

func (*ELF) AddressToOffset

func (f *ELF) AddressToOffset(addr uint64) (offset uint64, err error)

func (*ELF) FuncCalledBy

func (e *ELF) FuncCalledBy(funcname string) (called []string, err error)

func (*ELF) FuncFramePointerOffset

func (e *ELF) FuncFramePointerOffset(name string) (offset uint64, err error)

func (*ELF) FuncInstructions

func (e *ELF) FuncInstructions(name string) (insts []x86asm.Inst, addr, offset uint64, err error)

func (*ELF) FuncPcRangeInDwarf

func (e *ELF) FuncPcRangeInDwarf(funcname string) (lowpc, highpc uint64, err error)

func (*ELF) FuncPcRangeInSymtab

func (e *ELF) FuncPcRangeInSymtab(name string) (lowpc, highpc uint64, err error)

func (*ELF) FuncRawInstructions

func (e *ELF) FuncRawInstructions(name string) (bytes []byte, addr, offset uint64, err error)

func (*ELF) FuncRetOffsets

func (e *ELF) FuncRetOffsets(name string) (offsets []uint64, err error)

func (*ELF) IterDebugInfo

func (f *ELF) IterDebugInfo() <-chan *dwarf.Entry

func (*ELF) NonInlinedSubprogramDIEs

func (f *ELF) NonInlinedSubprogramDIEs() (dies map[string]*dwarf.Entry, err error)

func (*ELF) ResolveAddress

func (f *ELF) ResolveAddress(addr uint64) (sym elf.Symbol, offset uint, err error)

func (*ELF) ResolveInstructions

func (e *ELF) ResolveInstructions(bytes []byte) (insts []x86asm.Inst)

func (*ELF) ResolveSymbol

func (f *ELF) ResolveSymbol(sym string) (symbol elf.Symbol, err error)

func (*ELF) Section

func (f *ELF) Section(s string) *elf.Section

func (*ELF) SectionBytes

func (f *ELF) SectionBytes(s string) (bytes []byte, err error)

func (*ELF) Symbols

func (f *ELF) Symbols() (symbols []elf.Symbol, symnames map[string]elf.Symbol, err error)

func (*ELF) Text

func (e *ELF) Text() (bytes []byte, err error)

Jump to

Keyboard shortcuts

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