Documentation ¶
Index ¶
- Constants
- func Mmap(size int) ([]byte, error)
- func Munmap(b []byte) (err error)
- func Parse(f *os.File, pkgpath *string) ([]string, error)
- func RegSymbol(symPtr map[string]uintptr) error
- func RegTypes(symPtr map[string]uintptr, interfaces ...interface{})
- type CodeModule
- type Func
- type FuncInfo
- type InlTreeNode
- type Linker
- type ObjSymbol
- type Pkg
- type Reloc
- type Sym
Constants ¶
View Source
const ( PtrSize = 4 << (^uintptr(0) >> 63) Uint32Size = int(unsafe.Sizeof(uint32(0))) IntSize = int(unsafe.Sizeof(int(0))) UInt64Size = int(unsafe.Sizeof(uint64(0))) ItabSize = int(unsafe.Sizeof(itab{})) FindFuncBucketSize = int(unsafe.Sizeof(findfuncbucket{})) InlinedCallSize = int(unsafe.Sizeof(inlinedCall{})) InvalidHandleValue = ^uintptr(0) InvalidOffset = int(-1) InvalidIndex = uint32(0xFFFFFFFF) PageSize = 1 << 12 //4096 )
size
View Source
const ( EmptyString = "" DefaultPkgPath = "main" EmptyPkgPath = `""` ZeroByte = byte(0x00) )
View Source
const ( FileSymPrefix = "gofile.." TypeImportPathPrefix = "type..importpath." TypeDoubleDotPrefix = "type.." TypePrefix = "type." ItabPrefix = "go.itab." StkobjSuffix = ".stkobj" InlineTreeSuffix = ".inlinetree" OsStdout = "os.Stdout" )
string match prefix/suffix
View Source
const ( R_ADDR = 1 // R_ADDRARM64 relocates an adrp, add pair to compute the address of the // referenced symbol. R_ADDRARM64 = 3 // R_ADDROFF resolves to a 32-bit offset from the beginning of the section // holding the data being relocated to the referenced symbol. R_ADDROFF = 5 // R_WEAKADDROFF resolves just like R_ADDROFF but is a weak relocation. // A weak relocation does not make the symbol it refers to reachable, // and is only honored by the linker if the symbol is in some other way // reachable. R_WEAKADDROFF = 6 R_CALL = 8 R_CALLARM = 9 R_CALLARM64 = 10 R_CALLIND = 11 )
copy from $GOROOT/src/cmd/internal/objabi/reloctype.go
View Source
const (
RuntimeDeferReturn = "runtime.deferreturn"
)
runtime symbol
View Source
const (
TLSNAME = "(TLS)"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CodeModule ¶
func Load ¶
func Load(linker *Linker, symPtr map[string]uintptr) (codeModule *CodeModule, err error)
func (*CodeModule) Unload ¶
func (cm *CodeModule) Unload()
type InlTreeNode ¶ added in v0.0.12
type Linker ¶ added in v0.0.12
type Linker struct { Arch string // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.