executable

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownExecutable = fmt.Errorf("unknown executable format")

ErrUnknownExecutable returned if executable format was not recognized.

Functions

func Recognize

func Recognize(rw ReadWriterAt) (replacer.Executable, error)

Recognize attempts to recognize executable by first bytes.

Types

type ELF

type ELF struct {
	io.WriterAt
	// contains filtered or unexported fields
}

func NewELF

func NewELF(rw ReadWriterAt) (*ELF, error)

func (*ELF) GOARCH

func (elf *ELF) GOARCH() string

func (*ELF) GoPCLnTabData

func (elf *ELF) GoPCLnTabData() io.Reader

func (*ELF) GoSymTabData

func (elf *ELF) GoSymTabData() io.Reader

func (*ELF) Offset

func (elf *ELF) Offset(p *gosym.Func) int64

func (*ELF) TextAddr

func (elf *ELF) TextAddr() uint64

type ErrNotGo

type ErrNotGo string

ErrNotGo returned if executable is not go-program.

func (ErrNotGo) Error

func (e ErrNotGo) Error() string

type MachO

type MachO struct {
	io.WriterAt
	// contains filtered or unexported fields
}

func NewMachO

func NewMachO(rw ReadWriterAt) (*MachO, error)

func (*MachO) GOARCH

func (m *MachO) GOARCH() string

func (*MachO) GoPCLnTabData

func (m *MachO) GoPCLnTabData() io.Reader

func (*MachO) GoSymTabData

func (m *MachO) GoSymTabData() io.Reader

func (*MachO) Offset

func (m *MachO) Offset(p *gosym.Func) int64

func (*MachO) TextAddr

func (m *MachO) TextAddr() uint64

type PE

type PE struct {
	io.WriterAt
	// contains filtered or unexported fields
}

func NewPE

func NewPE(rw ReadWriterAt) (*PE, error)

func (*PE) GOARCH

func (pe *PE) GOARCH() string

func (*PE) GoPCLnTabData

func (pe *PE) GoPCLnTabData() io.Reader

func (*PE) GoSymTabData

func (pe *PE) GoSymTabData() io.Reader

func (*PE) Offset

func (pe *PE) Offset(p *gosym.Func) int64

func (*PE) TextAddr

func (pe *PE) TextAddr() uint64

type ReadWriterAt

type ReadWriterAt interface {
	io.ReaderAt
	io.WriterAt
}

ReadWriterAt combines io.ReaderAt and io.WriterAt.

Jump to

Keyboard shortcuts

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