Constants & Variables
A_AUTO
const
#
const A_AUTO = *ast.BinaryExpr
A_DELETED_AUTO
const
#
const A_DELETED_AUTO
A_PARAM
const
#
const A_PARAM
ElfRelocOffset
const
#
const ElfRelocOffset = 256
GlobalDictPrefix
const
#
const GlobalDictPrefix = ".dict"
Haix
const
#
const Haix
Hdarwin
const
#
const Hdarwin
Hdragonfly
const
#
const Hdragonfly
Hfreebsd
const
#
const Hfreebsd
Hjs
const
#
const Hjs
Hlinux
const
#
const Hlinux
Hnetbsd
const
#
const Hnetbsd
Hopenbsd
const
#
const Hopenbsd
Hplan9
const
#
const Hplan9
Hsolaris
const
#
const Hsolaris
Hunknown
const
#
const Hunknown HeadType = iota
Hwasip1
const
#
const Hwasip1
Hwindows
const
#
const Hwindows
MachoRelocOffset
const
#
const MachoRelocOffset = 2048
R_ADDR
const
#
const R_ADDR RelocType = *ast.BinaryExpr
R_ADDRARM64
const
#
const R_ADDRARM64
R_ADDRCUOFF
const
#
const R_ADDRCUOFF
R_ADDRMIPS
const
#
const R_ADDRMIPS
R_ADDRMIPSTLS
const
#
const R_ADDRMIPSTLS
R_ADDRMIPSU
const
#
const R_ADDRMIPSU
R_ADDROFF
const
#
const R_ADDROFF
R_ADDRPOWER
const
#
const R_ADDRPOWER
R_ADDRPOWER_D34
const
#
const R_ADDRPOWER_D34
R_ADDRPOWER_DS
const
#
const R_ADDRPOWER_DS
R_ADDRPOWER_GOT
const
#
const R_ADDRPOWER_GOT
R_ADDRPOWER_GOT_PCREL34
const
#
const R_ADDRPOWER_GOT_PCREL34
R_ADDRPOWER_PCREL
const
#
const R_ADDRPOWER_PCREL
R_ADDRPOWER_PCREL34
const
#
const R_ADDRPOWER_PCREL34
R_ADDRPOWER_TOCREL
const
#
const R_ADDRPOWER_TOCREL
R_ADDRPOWER_TOCREL_DS
const
#
const R_ADDRPOWER_TOCREL_DS
R_ARM64_GOT
const
#
const R_ARM64_GOT
R_ARM64_GOTPCREL
const
#
const R_ARM64_GOTPCREL
R_ARM64_LDST128
const
#
const R_ARM64_LDST128
R_ARM64_LDST16
const
#
const R_ARM64_LDST16
R_ARM64_LDST32
const
#
const R_ARM64_LDST32
R_ARM64_LDST64
const
#
const R_ARM64_LDST64
R_ARM64_LDST8
const
#
const R_ARM64_LDST8
R_ARM64_PCREL
const
#
const R_ARM64_PCREL
R_ARM64_PCREL_LDST16
const
#
const R_ARM64_PCREL_LDST16
R_ARM64_PCREL_LDST32
const
#
const R_ARM64_PCREL_LDST32
R_ARM64_PCREL_LDST64
const
#
const R_ARM64_PCREL_LDST64
R_ARM64_PCREL_LDST8
const
#
const R_ARM64_PCREL_LDST8
R_ARM64_TLS_IE
const
#
const R_ARM64_TLS_IE
R_ARM64_TLS_LE
const
#
const R_ARM64_TLS_LE
R_CALL
const
#
const R_CALL
R_CALLARM
const
#
const R_CALLARM
R_CALLARM64
const
#
const R_CALLARM64
R_CALLIND
const
#
const R_CALLIND
R_CALLLOONG64
const
#
const R_CALLLOONG64
R_CALLMIPS
const
#
const R_CALLMIPS
R_CALLPOWER
const
#
const R_CALLPOWER
R_CONST
const
#
const R_CONST
R_DWARFFILEREF
const
#
const R_DWARFFILEREF
R_DWARFSECREF
const
#
const R_DWARFSECREF
R_GOTOFF
const
#
const R_GOTOFF
R_GOTPCREL
const
#
const R_GOTPCREL
R_INITORDER
const
#
const R_INITORDER
R_JMP16LOONG64
const
#
const R_JMP16LOONG64
R_JMP21LOONG64
const
#
const R_JMP21LOONG64
R_JMPLOONG64
const
#
const R_JMPLOONG64
R_JMPMIPS
const
#
const R_JMPMIPS
R_KEEP
const
#
const R_KEEP
R_LOONG64_ADD64
const
#
const R_LOONG64_ADD64
R_LOONG64_ADDR_HI
const
#
const R_LOONG64_ADDR_HI
R_LOONG64_ADDR_LO
const
#
const R_LOONG64_ADDR_LO
R_LOONG64_GOT_HI
const
#
const R_LOONG64_GOT_HI
R_LOONG64_GOT_LO
const
#
const R_LOONG64_GOT_LO
R_LOONG64_SUB64
const
#
const R_LOONG64_SUB64
R_LOONG64_TLS_IE_HI
const
#
const R_LOONG64_TLS_IE_HI
R_LOONG64_TLS_IE_LO
const
#
const R_LOONG64_TLS_IE_LO
R_LOONG64_TLS_LE_HI
const
#
const R_LOONG64_TLS_LE_HI
R_LOONG64_TLS_LE_LO
const
#
const R_LOONG64_TLS_LE_LO
R_METHODOFF
const
#
const R_METHODOFF
R_PCREL
const
#
const R_PCREL
R_PCRELDBL
const
#
const R_PCRELDBL
R_PEIMAGEOFF
const
#
const R_PEIMAGEOFF
R_PLT0
const
#
const R_PLT0
R_PLT1
const
#
const R_PLT1
R_PLT2
const
#
const R_PLT2
R_POWER_TLS
const
#
const R_POWER_TLS
R_POWER_TLS_IE
const
#
const R_POWER_TLS_IE
R_POWER_TLS_IE_PCREL34
const
#
const R_POWER_TLS_IE_PCREL34
R_POWER_TLS_LE
const
#
const R_POWER_TLS_LE
R_POWER_TLS_LE_TPREL34
const
#
const R_POWER_TLS_LE_TPREL34
R_POWER_TOC
const
#
const R_POWER_TOC
R_RISCV_BRANCH
const
#
const R_RISCV_BRANCH
R_RISCV_CALL
const
#
const R_RISCV_CALL
R_RISCV_GOT_HI20
const
#
const R_RISCV_GOT_HI20
R_RISCV_JAL
const
#
const R_RISCV_JAL
R_RISCV_JAL_TRAMP
const
#
const R_RISCV_JAL_TRAMP
R_RISCV_PCREL_HI20
const
#
const R_RISCV_PCREL_HI20
R_RISCV_PCREL_ITYPE
const
#
const R_RISCV_PCREL_ITYPE
R_RISCV_PCREL_LO12_I
const
#
const R_RISCV_PCREL_LO12_I
R_RISCV_PCREL_LO12_S
const
#
const R_RISCV_PCREL_LO12_S
R_RISCV_PCREL_STYPE
const
#
const R_RISCV_PCREL_STYPE
R_RISCV_RVC_BRANCH
const
#
const R_RISCV_RVC_BRANCH
R_RISCV_RVC_JUMP
const
#
const R_RISCV_RVC_JUMP
R_RISCV_TLS_IE
const
#
const R_RISCV_TLS_IE
R_RISCV_TLS_LE
const
#
const R_RISCV_TLS_LE
R_SIZE
const
#
const R_SIZE
R_TLS_IE
const
#
const R_TLS_IE
R_TLS_LE
const
#
const R_TLS_LE
R_USEFIELD
const
#
const R_USEFIELD
R_USEIFACE
const
#
const R_USEIFACE
R_USEIFACEMETHOD
const
#
const R_USEIFACEMETHOD
R_USENAMEDMETHOD
const
#
const R_USENAMEDMETHOD
R_USETYPE
const
#
const R_USETYPE
R_WASMIMPORT
const
#
const R_WASMIMPORT
R_WEAK
const
#
const R_WEAK = *ast.BinaryExpr
R_WEAKADDR
const
#
const R_WEAKADDR = *ast.BinaryExpr
R_WEAKADDROFF
const
#
const R_WEAKADDROFF = *ast.BinaryExpr
R_XCOFFREF
const
#
const R_XCOFFREF
SBSS
const
#
const SBSS
SCOVERAGE_AUXVAR
const
#
const SCOVERAGE_AUXVAR
SCOVERAGE_COUNTER
const
#
const SCOVERAGE_COUNTER
SDATA
const
#
const SDATA
SDATAFIPS
const
#
const SDATAFIPS
SDWARFABSFCN
const
#
const SDWARFABSFCN
SDWARFCONST
const
#
const SDWARFCONST
SDWARFCUINFO
const
#
const SDWARFCUINFO
SDWARFFCN
const
#
const SDWARFFCN
SDWARFLINES
const
#
const SDWARFLINES
SDWARFLOC
const
#
const SDWARFLOC
SDWARFRANGE
const
#
const SDWARFRANGE
SDWARFTYPE
const
#
const SDWARFTYPE
SDWARFVAR
const
#
const SDWARFVAR
SLIBFUZZER_8BIT_COUNTER
const
#
const SLIBFUZZER_8BIT_COUNTER
SNOPTRBSS
const
#
const SNOPTRBSS
SNOPTRDATA
const
#
const SNOPTRDATA
SNOPTRDATAFIPS
const
#
const SNOPTRDATAFIPS
SRODATA
const
#
const SRODATA
SRODATAFIPS
const
#
const SRODATAFIPS
SSEHUNWINDINFO
const
#
const SSEHUNWINDINFO
STEXT
const
#
const STEXT
STEXTFIPS
const
#
const STEXTFIPS
STLSBSS
const
#
const STLSBSS
Sxxx
const
#
const Sxxx SymKind = iota
_RelocType_index
var
#
var _RelocType_index = [...]uint16{...}
_RelocType_name
const
#
const _RelocType_name = "R_ADDRR_ADDRPOWERR_ADDRARM64R_ADDRMIPSR_ADDROFFR_SIZER_CALLR_CALLARMR_CALLARM64R_CALLINDR_CALLPOWERR_CALLMIPSR_CONSTR_PCRELR_TLS_LER_TLS_IER_GOTOFFR_PLT0R_PLT1R_PLT2R_USEFIELDR_USETYPER_USEIFACER_USEIFACEMETHODR_USENAMEDMETHODR_METHODOFFR_KEEPR_POWER_TOCR_GOTPCRELR_JMPMIPSR_DWARFSECREFR_DWARFFILEREFR_ARM64_TLS_LER_ARM64_TLS_IER_ARM64_GOTPCRELR_ARM64_GOTR_ARM64_PCRELR_ARM64_PCREL_LDST8R_ARM64_PCREL_LDST16R_ARM64_PCREL_LDST32R_ARM64_PCREL_LDST64R_ARM64_LDST8R_ARM64_LDST16R_ARM64_LDST32R_ARM64_LDST64R_ARM64_LDST128R_POWER_TLS_LER_POWER_TLS_IER_POWER_TLSR_POWER_TLS_IE_PCREL34R_POWER_TLS_LE_TPREL34R_ADDRPOWER_DSR_ADDRPOWER_GOTR_ADDRPOWER_GOT_PCREL34R_ADDRPOWER_PCRELR_ADDRPOWER_TOCRELR_ADDRPOWER_TOCREL_DSR_ADDRPOWER_D34R_ADDRPOWER_PCREL34R_RISCV_JALR_RISCV_JAL_TRAMPR_RISCV_CALLR_RISCV_PCREL_ITYPER_RISCV_PCREL_STYPER_RISCV_TLS_IER_RISCV_TLS_LER_RISCV_GOT_HI20R_RISCV_PCREL_HI20R_RISCV_PCREL_LO12_IR_RISCV_PCREL_LO12_SR_RISCV_BRANCHR_RISCV_RVC_BRANCHR_RISCV_RVC_JUMPR_PCRELDBLR_LOONG64_ADDR_HIR_LOONG64_ADDR_LOR_LOONG64_TLS_LE_HIR_LOONG64_TLS_LE_LOR_CALLLOONG64R_LOONG64_TLS_IE_HIR_LOONG64_TLS_IE_LOR_LOONG64_GOT_HIR_LOONG64_GOT_LOR_LOONG64_ADD64R_LOONG64_SUB64R_JMP16LOONG64R_JMP21LOONG64R_JMPLOONG64R_ADDRMIPSUR_ADDRMIPSTLSR_ADDRCUOFFR_WASMIMPORTR_XCOFFREFR_PEIMAGEOFFR_INITORDER"
_SymKind_index
var
#
var _SymKind_index = [...]uint16{...}
_SymKind_name
const
#
const _SymKind_name = "SxxxSTEXTSTEXTFIPSSRODATASRODATAFIPSSNOPTRDATASNOPTRDATAFIPSSDATASDATAFIPSSBSSSNOPTRBSSSTLSBSSSDWARFCUINFOSDWARFCONSTSDWARFFCNSDWARFABSFCNSDWARFTYPESDWARFVARSDWARFRANGESDWARFLOCSDWARFLINESSLIBFUZZER_8BIT_COUNTERSCOVERAGE_COUNTERSCOVERAGE_AUXVARSSEHUNWINDINFO"
allowAsmABIPkgs
var
#
var allowAsmABIPkgs = []string{...}
buildID
var
#
var buildID string
funcIDs
var
#
var funcIDs = map[string]abi.FuncID{...}
noRaceFuncPkgs
var
#
var noRaceFuncPkgs = []string{...}
pkgSpecialsOnce
var
#
var pkgSpecialsOnce = *ast.CallExpr
runtimePkgs
var
#
var runtimePkgs = []string{...}
Functions
AbsFile
function
#
AbsFile returns the absolute filename for file in the given directory,
as rewritten by the rewrites argument.
For unrewritten paths, AbsFile rewrites a leading $GOROOT prefix to the literal "$GOROOT".
If the resulting path is the empty string, the result is "??".
The rewrites argument is a ;-separated list of rewrites.
Each rewrite is of the form "prefix" or "prefix=>replace",
where prefix must match a leading sequence of path elements
and is either removed entirely or replaced by the replacement.
func AbsFile(dir string, file string, rewrites string) string
AddVersionFlag
function
#
func AddVersionFlag()
ApplyRewrites
function
#
ApplyRewrites returns the filename for file in the given directory,
as rewritten by the rewrites argument.
The rewrites argument is a ;-separated list of rewrites.
Each rewrite is of the form "prefix" or "prefix=>replace",
where prefix must match a leading sequence of path elements
and is either removed entirely or replaced by the replacement.
func ApplyRewrites(file string, rewrites string) (string, bool)
DecodeArg
function
#
DecodeArg decodes an argument.
This function is public for testing with the parallel encoder.
func DecodeArg(arg string) string
Flagcount
function
#
func Flagcount(name string, usage string, val *int)
Flagfn1
function
#
func Flagfn1(name string, usage string, f func(string))
Flagparse
function
#
func Flagparse(usage func())
Flagprint
function
#
func Flagprint(w io.Writer)
Get
method
#
func (versionFlag) Get() interface{}
Get
method
#
func (c *count) Get() interface{}
GetFuncID
function
#
Get the function ID for the named function in the named file.
The function should be package-qualified.
func GetFuncID(name string, isWrapper bool) abi.FuncID
IsBoolFlag
method
#
func (versionFlag) IsBoolFlag() bool
IsBoolFlag
method
#
func (c *count) IsBoolFlag() bool
IsCountFlag
method
#
func (c *count) IsCountFlag() bool
IsDATA
method
#
IsDATA reports whether t is one of the DATA kinds (SDATA or SDATAFIPS,
excluding NOPTRDATA, RODATA, BSS, and so on).
func (t SymKind) IsDATA() bool
IsDirectCall
method
#
IsDirectCall reports whether r is a relocation for a direct call.
A direct call is a CALL instruction that takes the target address
as an immediate. The address is embedded into the instruction(s), possibly
with limited width. An indirect call is a CALL instruction that takes
the target address in register or memory.
func (r RelocType) IsDirectCall() bool
IsDirectCallOrJump
method
#
IsDirectCallOrJump reports whether r is a relocation for a direct
call or a direct jump.
func (r RelocType) IsDirectCallOrJump() bool
IsDirectJump
method
#
IsDirectJump reports whether r is a relocation for a direct jump.
A direct jump is a JMP instruction that takes the target address
as an immediate. The address is embedded into the instruction, possibly
with limited width. An indirect jump is a JMP instruction that takes
the target address in register or memory.
func (r RelocType) IsDirectJump() bool
IsFIPS
method
#
IsFIPS reports whether t is one fo the FIPS kinds.
func (t SymKind) IsFIPS() bool
IsText
method
#
IsText reports whether t is one of the text kinds.
func (t SymKind) IsText() bool
LookupPkgSpecial
function
#
LookupPkgSpecial returns special build properties for the given package path.
func LookupPkgSpecial(pkgPath string) PkgSpecial
NewDebugFlag
function
#
NewDebugFlag constructs a DebugFlag for the fields of debug, which
must be a pointer to a struct.
Each field of *debug is a different value, named for the lower-case of the field name.
Each field must be an int or string and must have a `help` struct tag.
There may be an "Any bool" field, which will be set if any debug flags are set.
The returned flag takes a comma-separated list of settings.
Each setting is name=value; for ints, name is short for name=1.
If debugSSA is non-nil, any debug flags of the form ssa/... will be
passed to debugSSA for processing.
func NewDebugFlag(debug interface{}, debugSSA DebugSSA) *DebugFlag
PathToPrefix
function
#
PathToPrefix converts raw string to the prefix that will be used in the
symbol table. All control characters, space, '%' and '"', as well as
non-7-bit clean bytes turn into %xx. The period needs escaping only in the
last segment of the path, and it makes for happier users if we escape that as
little as possible.
func PathToPrefix(s string) string
PrefixToPath
function
#
PrefixToPath is the inverse of PathToPrefix, replacing escape sequences with
the original character.
func PrefixToPath(s string) (string, error)
Set
method
#
func (f *DebugFlag) Set(debugstr string) error
Set
method
#
func (f fn1) Set(s string) error
Set
method
#
func (h *HeadType) Set(s string) error
Set
method
#
func (versionFlag) Set(s string) error
Set
method
#
func (c *count) Set(s string) error
StackNosplit
function
#
func StackNosplit(race bool) int
String
method
#
func (c *count) String() string
String
method
#
func (f fn1) String() string
String
method
#
func (i RelocType) String() string
String
method
#
func (h HeadType) String() string
String
method
#
func (f *DebugFlag) String() string
String
method
#
func (i SymKind) String() string
String
method
#
func (versionFlag) String() string
WorkingDir
function
#
WorkingDir returns the current working directory
(or "/???" if the directory cannot be identified),
with "/" as separator.
func WorkingDir() string
_
function
#
func _()
_
function
#
func _()
applyRewrite
function
#
applyRewrite applies the rewrite to the path,
returning the rewritten path and a boolean
indicating whether the rewrite applied at all.
func applyRewrite(path string, rewrite string) (string, bool)
expandArgs
function
#
expandArgs expands "response files" arguments in the provided slice.
A "response file" argument starts with '@' and the rest of that
argument is a filename with CR-or-CRLF-separated arguments. Each
argument in the named files can also contain response file
arguments. See Issue 18468.
The returned slice 'out' aliases 'in' iff the input did not contain
any response file arguments.
TODO: handle relative paths of recursive expansions in different directories?
Is there a spec for this? Are relative paths allowed?
func expandArgs(in []string) (out []string)
hasPathPrefix
function
#
Does s have t as a path prefix?
That is, does s == t or does s begin with t followed by a slash?
For portability, we allow ASCII case folding, so that hasPathPrefix("a/b/c", "A/B") is true.
Similarly, we allow slash folding, so that hasPathPrefix("a/b/c", "a\\b") is true.
We do not allow full Unicode case folding, for fear of causing more confusion
or harm than good. (For an example of the kinds of things that can go wrong,
see http://article.gmane.org/gmane.linux.kernel/1853266.)
func hasPathPrefix(s string, t string) bool
stackGuardMultiplier
function
#
stackGuardMultiplier returns a multiplier to apply to the default
stack guard size. Larger multipliers are used for non-optimized
builds that have larger stack frames or for specific targets.
func stackGuardMultiplier(race bool) int