Documentation ¶
Index ¶
- Constants
- Variables
- func AsRType(_typ *_type) reflect.Type
- func CanAttemptConversion(oldValue interface{}, newType reflect.Type) bool
- func CastToFuncUnsafe[T any](addr uintptr) T
- func ConvertTypesAcrossModules(oldModule, newModule *CodeModule, oldValue interface{}, newType reflect.Type) (res interface{}, err error)
- func FuncPCsABI0(abiInternalPCs []uintptr) []uintptr
- func MakeThreadJITCodeExecutable(ptr uintptr, len int)
- func Mmap(size int) ([]byte, error)
- func MmapData(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, pkgSet map[string]struct{}) error
- func RegSymbolWithSo(symPtr map[string]uintptr, pkgSet map[string]struct{}, path string) error
- func RegTypes(symPtr map[string]uintptr, interfaces ...interface{})
- func WithDumpTextBeforeAndAfterRelocs() func(*LinkerOptions)
- func WithForceTestRelocationEpilogues() func(*LinkerOptions)
- func WithNoRelocationEpilogues() func(*LinkerOptions)
- func WithRandomSymbolNameOrder() func(*LinkerOptions)
- func WithRelocationDebugWriter(writer io.Writer) func(*LinkerOptions)
- func WithSkipTypeDeduplicationForPackages(packages []string) func(*LinkerOptions)
- func WithSymbolNameOrder(symNames []string) func(*LinkerOptions)
- type CodeModule
- type Linker
- func (linker *Linker) Autolib() []string
- func (linker *Linker) Opts(linkerOpts ...LinkerOptFunc)
- func (linker *Linker) SymbolOrder() []string
- func (linker *Linker) UnloadStrings()
- func (linker *Linker) UnresolvedExternalSymbolUsers(symbolMap map[string]uintptr) map[string][]string
- func (linker *Linker) UnresolvedExternalSymbols(symbolMap map[string]uintptr, ignorePackages []string, ...) map[string]*obj.Sym
- func (linker *Linker) UnresolvedPackageReferences(existingPkgs []string) []string
- type LinkerOptFunc
- type LinkerOptions
- type Type
- type Value
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))) FindFuncBucketSize = int(unsafe.Sizeof(findfuncbucket{})) InvalidHandleValue = ^uintptr(0) InvalidOffset = int(-1) PageSize = 1 << 12 //4096 )
size
View Source
const ( EmptyString = "" DefaultPkgPath = "main" ZeroByte = byte(0x00) )
View Source
const ( FileSymPrefix = "gofile.." MainPkgPrefix = "main." OsStdout = "os.Stdout" FirstModulePrefix = "firstmodule." DefaultStringContainerSize = 1024 * 1024 * 16 )
string match prefix/suffix
View Source
const ( TypeImportPathPrefix = "type:.importpath." TypeDoubleDotPrefix = "type:." TypePrefix = "type:" ItabPrefix = "go:itab." TypeStringPrefix = "go:string." ObjSymbolSeparator = ":" )
View Source
const ( Invalid = reflectlite.Invalid Bool = reflectlite.Bool Int = reflectlite.Int Int8 = reflectlite.Int8 Int16 = reflectlite.Int16 Int32 = reflectlite.Int32 Int64 = reflectlite.Int64 Uint = reflectlite.Uint Uint8 = reflectlite.Uint8 Uint16 = reflectlite.Uint16 Uint32 = reflectlite.Uint32 Uint64 = reflectlite.Uint64 Uintptr = reflectlite.Uintptr Float32 = reflectlite.Float32 Float64 = reflectlite.Float64 Complex64 = reflectlite.Complex64 Complex128 = reflectlite.Complex128 Array = reflectlite.Array Chan = reflectlite.Chan Func = reflectlite.Func Interface = reflectlite.Interface Map = reflectlite.Map Pointer = reflectlite.Pointer Slice = reflectlite.Slice String = reflectlite.String Struct = reflectlite.Struct UnsafePointer = reflectlite.UnsafePointer Ptr = reflectlite.Ptr )
View Source
const (
EmptyPkgPath = "<unlinkable>"
)
View Source
const (
KindGCProg = 1 << 6
)
View Source
const (
RuntimeDeferReturn = "runtime.deferreturn"
)
runtime symbol
View Source
const (
TLSNAME = "(TLS)"
)
Variables ¶
View Source
var Indirect = reflectlite.Indirect
View Source
var MakeMapWithSize = reflectlite.MakeMapWithSize
View Source
var New = reflectlite.New
View Source
var NewAt = reflectlite.NewAt
View Source
var TypeOf = reflectlite.TypeOf
View Source
var ValueOf = reflectlite.ValueOf
Functions ¶
func CanAttemptConversion ¶
func CastToFuncUnsafe ¶
func ConvertTypesAcrossModules ¶
func ConvertTypesAcrossModules(oldModule, newModule *CodeModule, oldValue interface{}, newType reflect.Type) (res interface{}, err error)
func FuncPCsABI0 ¶
func RegSymbolWithSo ¶
func WithDumpTextBeforeAndAfterRelocs ¶
func WithDumpTextBeforeAndAfterRelocs() func(*LinkerOptions)
func WithForceTestRelocationEpilogues ¶
func WithForceTestRelocationEpilogues() func(*LinkerOptions)
func WithNoRelocationEpilogues ¶
func WithNoRelocationEpilogues() func(*LinkerOptions)
func WithRandomSymbolNameOrder ¶
func WithRandomSymbolNameOrder() func(*LinkerOptions)
func WithRelocationDebugWriter ¶
func WithRelocationDebugWriter(writer io.Writer) func(*LinkerOptions)
func WithSkipTypeDeduplicationForPackages ¶
func WithSkipTypeDeduplicationForPackages(packages []string) func(*LinkerOptions)
func WithSymbolNameOrder ¶
func WithSymbolNameOrder(symNames []string) func(*LinkerOptions)
WithSymbolNameOrder allows you to control the sequence (placement in memory) of symbols from an object file. When not set, the order as parsed from the archive file is used.
Types ¶
type CodeModule ¶
type CodeModule struct { SymbolsByPkg map[string]map[string]interface{} Syms map[string]uintptr // contains filtered or unexported fields }
func Load ¶
func Load(linker *Linker, symPtr map[string]uintptr) (codeModule *CodeModule, err error)
func (*CodeModule) DataAddr ¶
func (cm *CodeModule) DataAddr() (start, end uintptr)
func (*CodeModule) TextAddr ¶
func (cm *CodeModule) TextAddr() (start, end uintptr)
func (*CodeModule) Unload ¶
func (cm *CodeModule) Unload() error
type Linker ¶
func (*Linker) Opts ¶
func (linker *Linker) Opts(linkerOpts ...LinkerOptFunc)
func (*Linker) SymbolOrder ¶
func (*Linker) UnloadStrings ¶
func (linker *Linker) UnloadStrings()
func (*Linker) UnresolvedExternalSymbolUsers ¶
func (*Linker) UnresolvedExternalSymbols ¶
func (*Linker) UnresolvedPackageReferences ¶
type LinkerOptFunc ¶
type LinkerOptFunc func(options *LinkerOptions)
type LinkerOptions ¶
Source Files ¶
- asm_bytes.go
- const.go
- const_pkgpath.1.19.go
- const_type.1.20.go
- convert.1.19.go
- convert.go
- debug.go
- deferreturn.go
- func.1.20.go
- functab.1.18.go
- gcdata.go
- iface.1.10.go
- iface.go
- init.1.21.go
- inlinetree.go
- itab.go
- ld.go
- lookup_abi0_func.go
- module.1.21.go
- module.go
- readobj.go
- register.go
- relocate.go
- type.1.14.go
- type.1.21.go
- type.go
- utils.go
Directories ¶
Path | Synopsis |
---|---|
objabi
|
|
reflectlite
|
|
internal/goarch
package goarch contains GOARCH-specific constants.
|
package goarch contains GOARCH-specific constants. |
internal/unsafeheader
Package unsafeheader contains header declarations for the Go runtime's slice and string implementations.
|
Package unsafeheader contains header declarations for the Go runtime's slice and string implementations. |
reflectlite1.18
Package reflect implements run-time reflection, allowing a program to manipulate objects with arbitrary types.
|
Package reflect implements run-time reflection, allowing a program to manipulate objects with arbitrary types. |
unload
|
|
Click to show internal directories.
Click to hide internal directories.