Documentation
¶
Index ¶
- Constants
- func Adduint32(ctxt *Link, s *LSym, v uint32) int64
- func Adduint64(ctxt *Link, s *LSym, v uint64) int64
- func Atoi(s string) int
- func Bflush(b *Biobuf) error
- func Bgetc(b *Biobuf) int
- func Boffset(b *Biobuf) int64
- func Bputc(b *Biobuf, c byte)
- func Bungetc(b *Biobuf)
- func Bwrite(b *Biobuf, p []byte) (int, error)
- func Cputime() float64
- func Getgoarch() string
- func Getgoarm() string
- func Getgoos() string
- func Getgoroot() string
- func Headstr(v int) string
- func Symgrow(ctxt *Link, s *LSym, lsiz int64)
- func Writeobjdirect(ctxt *Link, b *Biobuf)
- type Addr
- type Auto
- type Biobuf
- type Fmt
- type Hist
- type LSym
- type Library
- type Link
- type LinkArch
- type NameVers
- type Pcdata
- type Pciter
- type Pcln
- type Plist
- type Prog
- type Reloc
Constants ¶
View Source
const ( FmtWidth = 1 FmtLeft = FmtWidth << 1 FmtPrec = FmtLeft << 1 FmtSharp = FmtPrec << 1 FmtSpace = FmtSharp << 1 FmtSign = FmtSpace << 1 FmtApost = FmtSign << 1 FmtZero = FmtApost << 1 FmtUnsigned = FmtZero << 1 FmtShort = FmtUnsigned << 1 FmtLong = FmtShort << 1 FmtVLong = FmtLong << 1 FmtComma = FmtVLong << 1 FmtByte = FmtComma << 1 FmtLDouble = FmtByte << 1 FmtFlag = FmtLDouble << 1 )
View Source
const ( PCDATA_StackMapIndex = 0 FUNCDATA_ArgsPointerMaps = 0 FUNCDATA_LocalsPointerMaps = 1 FUNCDATA_DeadValueMaps = 2 ArgsSizeUnknown = 0x80000000 )
ArgsSizeUnknown is set in Func.argsize to mark all functions whose argument size is unknown (C vararg functions, and assembly code without an explicit specification). This value is generated by the compiler, assembler, or linker.
View Source
const ( Sxxx = iota STEXT SELFRXSECT STYPE SSTRING SGOSTRING SGOFUNC SRODATA SFUNCTAB STYPELINK SSYMTAB SPCLNTAB SELFROSECT SMACHOPLT SELFSECT SMACHO SMACHOGOT SWINDOWS SELFGOT SNOPTRDATA SINITARR SDATA SBSS SNOPTRBSS STLSBSS SXREF SMACHOSYMSTR SMACHOSYMTAB SMACHOINDIRECTPLT SMACHOINDIRECTGOT SFILE SFILEPATH SCONST SDYNIMPORT SHOSTOBJ SSUB = 1 << 8 SMASK = SSUB - 1 SHIDDEN = 1 << 9 )
LSym.type
View Source
const ( R_ADDR = 1 + iota R_ADDRPOWER R_SIZE R_CALL R_CALLARM R_CALLIND R_CALLPOWER R_CONST R_PCREL R_TLS R_TLS_LE R_TLS_IE R_GOTOFF R_PLT0 R_PLT1 R_PLT2 R_USEFIELD R_POWER_TOC )
Reloc.type
View Source
const ( RV_NONE = iota RV_POWER_LO RV_POWER_HI RV_POWER_HA RV_POWER_DS RV_CHECK_OVERFLOW = 1 << 8 RV_TYPE_MASK = RV_CHECK_OVERFLOW - 1 )
Reloc.variant
View Source
const ( A_AUTO = 1 + iota A_PARAM )
Auto.type
View Source
const ( LittleEndian = 0x04030201 BigEndian = 0x01020304 )
View Source
const ( Hunknown = 0 + iota Hdarwin Hdragonfly Helf Hfreebsd Hlinux Hnacl Hnetbsd Hopenbsd Hplan9 Hsolaris Hwindows )
executable header types
View Source
const ( LinkAuto = 0 + iota LinkInternal LinkExternal )
View Source
const ( HISTSZ = 10 NSYM = 50 )
View Source
const ( StackSystem = 0 StackBig = 4096 StackGuard = 640 + StackSystem StackSmall = 128 StackLimit = StackGuard - StackSystem - StackSmall )
View Source
const ( // Don't profile the marked routine. This flag is deprecated. NOPROF = 1 // It is ok for the linker to get multiple of these symbols. It will // pick one of the duplicates to use. DUPOK = 2 // Don't insert stack check preamble. NOSPLIT = 4 // Put this data in a read-only section. RODATA = 8 // This data contains no pointers. NOPTR = 16 // This is a wrapper function and should not count as disabling 'recover'. WRAPPER = 32 // This function uses its incoming context register. NEEDCTXT = 64 )
View Source
const (
HistVersion = 1
)
symbol version, incremented each time a file is loaded. version==1 is reserved for savehist.
View Source
const (
LINKHASH = 100003
)
View Source
const (
LOG = 5
)
View Source
const (
StackPreempt = -1314 // 0xfff...fade
)
Variables ¶
This section is empty.
Functions ¶
func Writeobjdirect ¶
The Go and C compilers, and the assembler, call writeobj to write out a Go object file. The linker does not call this; the linker does not write out object files.
Types ¶
type LSym ¶
type LSym struct {
Name string
Extname string
Type_ int16
Version int16
Dupok uint8
Cfunc uint8
External uint8
Nosplit uint8
Reachable uint8
Cgoexport uint8
Special uint8
Stkcheck uint8
Hide uint8
Leaf uint8
Fnptr uint8
Localentry uint8
Seenglobl uint8
Onlist uint8
Printed uint8
Symid int16
Dynid int32
Sig int32
Plt int32
Got int32
Align int32
Elfsym int32
Args int32
Locals int32
Value int64
Size int64
Allsym *LSym
Next *LSym
Sub *LSym
Outer *LSym
Gotype *LSym
Reachparent *LSym
Queue *LSym
File string
Dynimplib string
Dynimpvers string
Sect *struct{}
Autom *Auto
Text *Prog
Etext *Prog
Pcln *Pcln
P []byte
R []Reloc
}
type Link ¶
type Link struct {
Thechar int32
Thestring string
Goarm int32
Headtype int
Arch *LinkArch
Ignore func(string) int32
Debugasm int32
Debugline int32
Debughist int32
Debugread int32
Debugvlog int32
Debugstack int32
Debugzerostack int32
Debugdivmod int32
Debugfloat int32
Debugpcln int32
Iself int32
Bso *Biobuf
Pathname string
Windows int32
Trimpath string
Goroot string
Goroot_final string
Enforce_data_order int32
Allsym *LSym
Nsymbol int32
Hist *Hist
Ehist *Hist
Plist *Plist
Plast *Plist
Sym_div *LSym
Sym_divu *LSym
Sym_mod *LSym
Sym_modu *LSym
Symmorestack [2]*LSym
Tlsg *LSym
Plan9privates *LSym
Curp *Prog
Printp *Prog
Blitrl *Prog
Elitrl *Prog
Rexflag int
Rep int
Repn int
Lock int
Asmode int
Andptr []byte
And [100]uint8
Instoffset int64
Autosize int32
Armsize int32
Pc int64
Libdir []string
Library []Library
Tlsoffset int
Diag func(string, ...interface{})
Mode int
Curauto *Auto
Curhist *Auto
Cursym *LSym
Version int
Textp *LSym
Etextp *LSym
Histdepth int32
Nhistfile int32
Filesyms *LSym
Hash map[NameVers]*LSym
}
type LinkArch ¶
type LinkArch struct {
Pconv func(*Prog) string
Name string
Thechar int
Endian int32
ByteOrder binary.ByteOrder
Addstacksplit func(*Link, *LSym)
Assemble func(*Link, *LSym)
Datasize func(*Prog) int
Follow func(*Link, *LSym)
Iscall func(*Prog) bool
Isdata func(*Prog) bool
Prg func() *Prog
Progedit func(*Link, *Prog)
Settextflag func(*Prog, int)
Symtype func(*Addr) int
Textflag func(*Prog) int
Minlc int
Ptrsize int
Regsize int
D_ADDR int
D_AUTO int
D_BRANCH int
D_CONST int
D_EXTERN int
D_FCONST int
D_NONE int
D_PARAM int
D_SCONST int
D_STATIC int
D_OREG int
ACALL int
ADATA int
AEND int
AFUNCDATA int
AGLOBL int
AJMP int
ANOP int
APCDATA int
ARET int
ATEXT int
ATYPE int
AUSEFIELD int
}
type Prog ¶
type Prog struct {
Ctxt *Link
Pc int64
Lineno int32
Link *Prog
As int16
Scond uint8
From Addr
Reg uint8
From3 Addr
To Addr
Opt interface{}
Forwd *Prog
Pcond *Prog
Comefrom *Prog
Pcrel *Prog
Spadj int32
Mark uint16
Optab uint16
Back uint8
Ft uint8
Tt uint8
Isize uint8
Printed uint8
Width int8
Mode int8
TEXTFLAG uint8
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.