Documentation ¶
Index ¶
- Constants
- func GetFunctionName(i interface{}) string
- func Mmap(size int) ([]byte, error)
- func Munmap(b []byte) (err error)
- func RegFunc(symPtr map[string]uintptr, name string, f interface{})
- func RegItab(symPtr map[string]uintptr, name string, addr uintptr)
- func RegSymbol(symPtr map[string]uintptr)
- func RegTLS(symPtr map[string]uintptr, offset int)
- func RegType(symPtr map[string]uintptr, name string, typ interface{})
- func RegTypes(symPtr map[string]uintptr, interfaces ...interface{})
- func ToType(typ reflect.Type) *_type
- type CodeModule
- type CodeReloc
- type Module
- type Reloc
- type SymData
Constants ¶
View Source
const ( // R_TLS_LE, used on 386, amd64, and ARM, resolves to the offset of the // thread-local symbol from the thread local base and is used to implement the // "local exec" model for tls access (r.Sym is not set on intel platforms but is // set to a TLS symbol -- runtime.tlsg -- in the linker when externally linking). R_TLS_LE = 16 R_CALL = 8 R_CALLARM = 9 R_CALLARM64 = 10 R_CALLIND = 11 R_PCREL = 15 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_METHODOFF resolves to a 32-bit offset from the beginning of the section // holding the data being relocated to the referenced symbol. // It is a variant of R_ADDROFF used when linking from the uncommonType of a // *rtype, and may be set to zero by the linker if it determines the method // text is unreachable by the linked program. R_METHODOFF = 24 )
copy from $GOROOT/src/cmd/internal/objabi/reloctype.go
View Source
const ( // An otherwise invalid zero value for the type Sxxx = iota // Executable instructions STEXT // Read only static data SRODATA // Static data that does not contain any pointers SNOPTRDATA // Static data SDATA // Statically data that is initially all 0s SBSS // Statically data that is initially all 0s and does not contain pointers SNOPTRBSS // Thread-local data that is initally all 0s STLSBSS // Debugging data SDWARFINFO SDWARFRANGE )
copy from $GOROOT/src/cmd/internal/objabi/symkind.go
View Source
const ( TLSNAME = "(TLS)" R_CALLIND_NAME = "R_CALLIND" )
View Source
const PtrSize = 4 << (^uintptr(0) >> 63)
Variables ¶
This section is empty.
Functions ¶
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
Types ¶
type CodeModule ¶
type CodeModule struct { Syms map[string]uintptr CodeByte []byte Module interface{} // contains filtered or unexported fields }
func (*CodeModule) Unload ¶
func (cm *CodeModule) Unload()
Click to show internal directories.
Click to hide internal directories.