Documentation ¶
Index ¶
- Constants
- func BuiltinIdx(name string, abi int) int
- func BuiltinName(i int) (string, int)
- func NBuiltin() int
- type Aux
- type FuncInfo
- type Header
- type InlTreeNode
- type Reader
- func (r *Reader) Autolib() []string
- func (r *Reader) AuxOff(i int, j int) uint32
- func (r *Reader) BytesAt(off uint32, len int) []byte
- func (r *Reader) Data(i int) []byte
- func (r *Reader) DataOff(i int) uint32
- func (r *Reader) DataSize(i int) int
- func (r *Reader) DwarfFile(i int) string
- func (r *Reader) Flags() uint32
- func (r *Reader) NAux(i int) int
- func (r *Reader) NDwarfFile() int
- func (r *Reader) NNonpkgdef() int
- func (r *Reader) NNonpkgref() int
- func (r *Reader) NPkg() int
- func (r *Reader) NReloc(i int) int
- func (r *Reader) NSym() int
- func (r *Reader) PcdataBase() uint32
- func (r *Reader) Pkg(i int) string
- func (r *Reader) Pkglist() []string
- func (r *Reader) ReadOnly() bool
- func (r *Reader) RelocOff(i int, j int) uint32
- func (r *Reader) StringAt(off uint32) string
- func (r *Reader) StringRef(off uint32) string
- func (r *Reader) SymOff(i int) uint32
- type Reloc
- type Sym
- func (s *Sym) CFunc() bool
- func (s *Sym) Dupok() bool
- func (s *Sym) IsGoType() bool
- func (s *Sym) Leaf() bool
- func (s *Sym) Local() bool
- func (s *Sym) Read(r *Reader, off uint32)
- func (s *Sym) ReflectMethod() bool
- func (s *Sym) Size() int
- func (s *Sym) TopFrame() bool
- func (s *Sym) Typelink() bool
- func (s *Sym) Write(w *Writer)
- type SymRef
- type Writer
- func (w *Writer) AddString(s string)
- func (w *Writer) Bytes(s []byte)
- func (w *Writer) Offset() uint32
- func (w *Writer) RawString(s string)
- func (w *Writer) StringRef(s string)
- func (w *Writer) Uint16(x uint16)
- func (w *Writer) Uint32(x uint32)
- func (w *Writer) Uint64(x uint64)
- func (w *Writer) Uint8(x uint8)
Constants ¶
View Source
const ( PkgIdxNone = (1<<31 - 1) - iota // Non-package symbols PkgIdxBuiltin // Predefined symbols // TODO: not used for now, we could use it for compiler-generated symbols like runtime.newobject PkgIdxSelf // Symbols defined in the current package PkgIdxInvalid = 0 )
Package Index.
View Source
const ( BlkAutolib = iota BlkPkgIdx BlkDwarfFile BlkSymdef BlkNonpkgdef BlkNonpkgref BlkRelocIdx BlkAuxIdx BlkDataIdx BlkReloc BlkAux BlkData BlkPcdata NBlk )
Blocks
View Source
const ( SymFlagDupok = 1 << iota SymFlagLocal SymFlagTypelink SymFlagLeaf SymFlagCFunc SymFlagReflectMethod SymFlagGoType SymFlagTopFrame )
View Source
const ( AuxGotype = iota AuxFuncInfo AuxFuncdata AuxDwarfInfo AuxDwarfLoc AuxDwarfRanges AuxDwarfLines )
Aux Type
View Source
const Magic = "\x00go114LD"
View Source
const (
)
View Source
const SymABIstatic = ^uint16(0)
Variables ¶
This section is empty.
Functions ¶
func BuiltinIdx ¶
BuiltinIdx returns the index of the builtin with the given name and abi, or -1 if it is not a builtin.
func BuiltinName ¶
BuiltinName returns the name and ABI of the i-th builtin symbol.
Types ¶
type FuncInfo ¶
type FuncInfo struct { NoSplit uint8 Args uint32 Locals uint32 Pcsp uint32 Pcfile uint32 Pcline uint32 Pcinline uint32 Pcdata []uint32 PcdataEnd uint32 Funcdataoff []uint32 File []SymRef // TODO: just use string? InlTree []InlTreeNode }
FuncInfo is serialized as a symbol (aux symbol). The symbol data is the binary encoding of the struct below.
TODO: make each pcdata a separate symbol?
type InlTreeNode ¶
InlTreeNode is the serialized form of FileInfo.InlTree.
func (*InlTreeNode) Read ¶
func (inl *InlTreeNode) Read(b []byte) []byte
Read an InlTreeNode from b, return the remaining bytes.
func (*InlTreeNode) Write ¶
func (inl *InlTreeNode) Write(w *bytes.Buffer)
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReaderFromBytes ¶
func (*Reader) NDwarfFile ¶
func (*Reader) NNonpkgdef ¶
func (*Reader) NNonpkgref ¶
func (*Reader) PcdataBase ¶
AuxDataBase returns the base offset of the aux data block.
Click to show internal directories.
Click to hide internal directories.