Documentation ¶
Index ¶
Constants ¶
const (
CompilerObjName = "__.PKGDEF"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArchiveHeader ¶
type ArchiveMember ¶
type ArchiveMember struct { ArchiveHeader ArchiveHeader ObjHeader goobj2.Header Imports []goobj2.ImportedPkg Packages []string DWARFFileList []string SymDefs []*Sym NonPkgSymDefs []*Sym NonPkgSymRefs []*Sym SymRefs []SymRef IsDataObj bool // contains filtered or unexported fields }
func (ArchiveMember) IsCompilerObj ¶
func (a ArchiveMember) IsCompilerObj() bool
type ExportInfo ¶
type ExportInfo struct { Path string }
type Func ¶
type Func struct { Args int64 // size in bytes of argument frame: inputs and outputs Frame int64 // size in bytes of local variable frame PCSP []byte // PC → SP offset map PCFile []byte // PC → file number map (index into File) PCLine []byte // PC → line number map PCInline []byte // PC → inline tree index map PCData [][]byte // PC → runtime support data map FuncData []FuncData // non-PC-specific runtime support data File []SymRef // paths indexed by PCFile InlTree []*InlinedCall FuncInfo *SymRef DwarfInfo *SymRef DwarfLoc *SymRef DwarfRanges *SymRef DwarfDebugLines *SymRef // contains filtered or unexported fields }
Func contains additional per-symbol information specific to functions.
type FuncData ¶
type FuncData struct { Sym *SymRef // symbol holding data Offset uint32 // offset into symbol for funcdata pointer }
A FuncData is a single function-specific data value.
type ImportCfg ¶
type ImportCfg struct { ImportMap map[string]string Packages map[string]ExportInfo }
func ParseImportCfg ¶
type ImportMap ¶
ImportMap is a function that returns the path of a Go object from a given import path. If the import path is not known, an empty string should be returned.
type InlinedCall ¶
An InlinedCall is a node in an InlTree. See cmd/internal/obj.InlTree for details.
type Package ¶
type Package struct { ArchiveMembers []ArchiveMember ImportPath string // contains filtered or unexported fields }
A Package is a parsed Go object file or archive defining a Go package.
type Reloc ¶
type Reloc struct { Name string // The bytes at [Offset, Offset+Size) within the containing Sym // should be updated to refer to the address Add bytes after the start // of the symbol Sym. Offset int64 Size int64 Sym goobj2.SymRef Add int64 // The Type records the form of address expected in the bytes // described by the previous fields: absolute, PC-relative, and so on. // TODO(rsc): The interpretation of Type is not exposed by this package. Type objabi.RelocType }
A Reloc describes a relocation applied to a memory image to refer to an address within a particular symbol.
type Sym ¶
type Sym struct { Name string ABI uint16 Kind SymKind // kind of symbol Flag uint8 Size uint32 // size of corresponding data Align uint32 Type *SymRef // symbol for Go type information Data []byte // memory image of symbol Reloc []Reloc // relocations to apply to Data Func *Func // additional data for functions }
A Sym is a named symbol in an object file.
type SymKind ¶
type SymKind uint8
A SymKind describes the kind of memory represented by a symbol.
const ( // An otherwise invalid zero value for the type Sxxx SymKind = 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 initially all 0s STLSBSS // Debugging data SDWARFINFO SDWARFRANGE SDWARFLOC SDWARFLINES // ABI alias. An ABI alias symbol is an empty symbol with a // single relocation with 0 size that references the native // function implementation symbol. // // TODO(austin): Remove this and all uses once the compiler // generates real ABI wrappers rather than symbol aliases. SABIALIAS // Coverage instrumentation counter for libfuzzer. SLIBFUZZER_EXTRA_COUNTER )
Defined SymKind values. Copied from cmd/internal/objabi