obj

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	InvalidOffset   = int(-1)
	InvalidIndex    = uint32(0xFFFFFFFF)
	InlinedCallSize = int(unsafe.Sizeof(InlinedCall{}))
	EmptyString     = ""
)

Variables

This section is empty.

Functions

func FindFileTab added in v0.0.18

func FindFileTab(filename string, namemap map[string]int, filetab []uint32) int32

func Grow added in v0.0.19

func Grow(bytes *[]byte, size int)

func PathToPrefix added in v0.0.19

func PathToPrefix(s string) string

func ReplacePkgPath added in v0.0.19

func ReplacePkgPath(name, pkgpath string) string

Types

type Epilogue added in v0.0.17

type Epilogue struct {
	Offset int
	Size   int
}

type Func

type Func struct {
	PCData   []uint32
	FuncData []uintptr
}

type FuncInfo

type FuncInfo struct {
	Args      uint32
	Locals    uint32
	FuncID    uint8
	FuncFlag  uint8
	StartLine int32
	PCSP      []byte
	PCFile    []byte
	PCLine    []byte
	PCInline  []byte
	PCData    [][]byte
	File      []string
	FuncData  []string
	InlTree   []InlTreeNode
	CUOffset  int32
}

type InlTreeNode

type InlTreeNode struct {
	Parent   int64
	File     string
	Line     int64
	Func     string
	ParentPC int64
}

type InlinedCall added in v0.0.19

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

/ inlinedCall is the encoding of entries in the FUNCDATA_InlTree table.

func InitInlinedCall added in v0.0.19

func InitInlinedCall(inl InlTreeNode, funcid uint8, namemap map[string]int, filetab []uint32) InlinedCall

type ObjSymbol

type ObjSymbol struct {
	Name  string
	Kind  int    // kind of symbol
	DupOK bool   // are duplicate definitions okay?
	Size  int64  // size of corresponding data
	Data  []byte // memory image of symbol
	Type  string
	Reloc []Reloc
	Func  *FuncInfo // additional data for functions
}

type Pkg

type Pkg struct {
	Syms       map[string]*ObjSymbol
	Arch       string
	PkgPath    string
	File       string
	ImportPkgs []string
	CUFiles    []string
}

func (*Pkg) Symbols added in v0.0.19

func (pkg *Pkg) Symbols() error

type Reloc

type Reloc struct {
	Offset  int
	SymName string
	Size    int
	Type    int
	Add     int
	Epilogue
}

copy from $GOROOT/src/cmd/internal/goobj/read.go type Reloc struct

type Sym

type Sym struct {
	Name   string
	Kind   int
	Offset int
	Func   *Func
	Reloc  []Reloc
}

copy from $GOROOT/src/cmd/internal/goobj/read.go type Sym struct

Jump to

Keyboard shortcuts

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