internal

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(bin string, options Options) (*result.Result, error)

Types

type Dependencies

type Dependencies struct {
	TopPkgs entity.PackageMap
	// contains filtered or unexported fields
}

Dependencies a pseudo package for the whole binary

func NewDependencies

func NewDependencies(k *KnownInfo) *Dependencies

func (*Dependencies) Add

func (m *Dependencies) Add(gp *gore.Package, typ entity.PackageType, pclntab *gosym.Table)

func (*Dependencies) AddModules added in v0.2.4

func (m *Dependencies) AddModules(mods []*debug.Module, typ entity.PackageType)

func (*Dependencies) FinishLoad added in v0.2.4

func (m *Dependencies) FinishLoad()

func (*Dependencies) GetFunctions

func (m *Dependencies) GetFunctions() []*entity.Function

func (*Dependencies) GetPackage

func (m *Dependencies) GetPackage(name string) (*entity.Package, bool)

type KnownInfo

type KnownInfo struct {
	Size      uint64
	BuildInfo *gore.BuildInfo
	Sects     *SectionMap
	Deps      *Dependencies
	KnownAddr *entity.KnownAddr

	Coverage entity.AddrCoverage

	VersionFlag struct {
		Leq118 bool
		Meq120 bool
	}
	// contains filtered or unexported fields
}

func (*KnownInfo) AnalyzeSymbol

func (k *KnownInfo) AnalyzeSymbol() error

func (*KnownInfo) CalculatePackageSize

func (k *KnownInfo) CalculatePackageSize()

CalculatePackageSize calculate the size of each package Happens after disassembly

func (*KnownInfo) CalculateSectionSize

func (k *KnownInfo) CalculateSectionSize()

func (*KnownInfo) CollectCoverage

func (k *KnownInfo) CollectCoverage()

func (*KnownInfo) Disasm

func (k *KnownInfo) Disasm() error

func (*KnownInfo) ExtractPackageFromSymbol

func (k *KnownInfo) ExtractPackageFromSymbol(s string) string

ExtractPackageFromSymbol copied from debug/gosym/symtab.go

func (*KnownInfo) LoadPackages

func (k *KnownInfo) LoadPackages() error

func (*KnownInfo) LoadSectionMap

func (k *KnownInfo) LoadSectionMap()

func (*KnownInfo) MarkSymbol

func (k *KnownInfo) MarkSymbol(name string, addr, size uint64, typ entity.AddrType) error

func (*KnownInfo) RequireModInfo

func (k *KnownInfo) RequireModInfo()

func (*KnownInfo) UpdateVersionFlag

func (k *KnownInfo) UpdateVersionFlag()

type Options

type Options struct {
	SkipSymbol bool
	SkipDisasm bool
}

type SectionMap

type SectionMap struct {
	Sections map[string]*entity.Section
}

func (*SectionMap) AssertSize

func (s *SectionMap) AssertSize(size uint64) error

func (*SectionMap) FindSection added in v0.2.4

func (s *SectionMap) FindSection(addr, size uint64) *entity.Section

Directories

Path Synopsis
Package disasm This package was written based on the go/cmd/internal/objfile package.
Package disasm This package was written based on the go/cmd/internal/objfile package.

Jump to

Keyboard shortcuts

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