Documentation ¶
Index ¶
Constants ¶
View Source
const ( InvalidOffset = int(-1) InvalidIndex = uint32(0xFFFFFFFF) InlinedCallSize = int(unsafe.Sizeof(InlinedCall{})) EmptyString = "" ABI0Suffix = ".abi0" ABIInternalSuffix = ".abiinternal" UnresolvedSymRefPrefix = "unresolved." )
View Source
const ( TypeStringPrefix = "go:string." ObjSymbolSeparator = ":" TypeDoubleDotPrefix = "type:." TypePrefix = "type:" )
View Source
const ( IMAGE_SYM_CLASS_STATIC = 3 IMAGE_REL_I386_DIR32 = 0x0006 IMAGE_REL_I386_DIR32NB = 0x0007 IMAGE_REL_I386_REL32 = 0x0014 IMAGE_REL_AMD64_ADDR64 = 0x0001 IMAGE_REL_AMD64_ADDR32 = 0x0002 IMAGE_REL_AMD64_ADDR32NB = 0x0003 IMAGE_REL_AMD64_REL32 = 0x0004 )
See cmd/link/internal/loadpd/ldpe.go for reference
View Source
const (
EmptyPkgPath = "<unlinkable>"
)
Variables ¶
View Source
var ( ModuleHeadx86 = []byte{0xF1, 0xFF, 0xFF, 0xFF, 0x0, 0x0, 0x1, 0x0} ModuleHeadarm = []byte{0xF1, 0xFF, 0xFF, 0xFF, 0x0, 0x0, 0x4, 0x0} )
golang 1.20 change magic number
Functions ¶
func UnresolvedIdxString ¶
Types ¶
type CompilationUnitFiles ¶
type ExportSymType ¶
type FuncID ¶
type FuncID uint8
const ( FuncIDNormal FuncID = iota // not a special function FuncID_abort FuncID_asmcgocall FuncID_asyncPreempt FuncID_cgocallback FuncID_debugCallV2 FuncID_gcBgMarkWorker FuncID_goexit FuncID_gogo FuncID_gopanic FuncID_handleAsyncEvent FuncID_mcall FuncID_morestack FuncID_mstart FuncID_panicwrap FuncID_rt0_go FuncID_runfinq FuncID_runtime_main FuncID_sigpanic FuncID_systemstack FuncID_systemstack_switch FuncIDWrapper // any autogenerated code (hash/eq algorithms, method wrappers, etc.) )
type InlTreeNode ¶
type InlinedCall ¶
type InlinedCall struct {
// contains filtered or unexported fields
}
inlinedCall is the encoding of entries in the FUNCDATA_InlTree table.
func InitInlinedCall ¶
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 Objidx uint32 // the index of the archive which the symbol came from when loading multiple files Pkg string }
type Pkg ¶
type Pkg struct { Syms map[string]*ObjSymbol CUFiles []CompilationUnitFiles Arch string PkgPath string F *os.File SymNameOrder []string Objidx uint32 // index of this archive in the slice of files ReferencedPkgs []string SymNamesByIdx map[uint32]string AutoLib []string Exports map[string]ExportSymType }
type Reloc ¶
type Reloc struct { Offset int Sym *Sym Size int Type int Add int EpilogueOffset int // This is added to store the offset of the extra instructions added by goloader in the case of certain overflowing relocations, e.g. ADRP, PCREL, CALLARM64 EpilogueSize int }
copy from $GOROOT/src/cmd/internal/goobj/read.go type Reloc struct
Click to show internal directories.
Click to hide internal directories.