Imports #
"cmd/internal/obj"
"internal/buildcfg"
"cmd/internal/objabi"
"strconv"
"cmd/internal/dwarf"
"cmd/internal/goobj"
"cmd/internal/objabi"
"cmd/internal/sys"
"debug/elf"
"debug/macho"
"cmd/internal/obj"
"internal/buildcfg"
"cmd/internal/objabi"
"strconv"
"cmd/internal/dwarf"
"cmd/internal/goobj"
"cmd/internal/objabi"
"cmd/internal/sys"
"debug/elf"
"debug/macho"
AbiSymKindToSymKind maps values read from object files (which are of type cmd/internal/objabi.SymKind) to values of type SymKind.
var AbiSymKindToSymKind = [...]SymKind{...}
RV_390_DBL is a s390x-specific relocation variant that indicates that the value to be placed into the relocatable field should first be divided by 2.
const RV_390_DBL
const RV_CHECK_OVERFLOW RelocVariant = *ast.BinaryExpr
const RV_NONE RelocVariant = iota
const RV_POWER_DS
const RV_POWER_HA
const RV_POWER_HI
const RV_POWER_LO
const RV_TYPE_MASK RelocVariant = *ast.BinaryExpr
ReadOnly are the symbol kinds that form read-only sections. In some cases, if they will require relocations, they are transformed into rel-ro sections using relROMap.
var ReadOnly = []SymKind{...}
RelROMap describes the transformation of read-only symbols to rel-ro symbols.
var RelROMap = map[SymKind]SymKind{...}
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SBSS
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SBUILDINFO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SCOVERAGE_AUXVAR
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SCOVERAGE_COUNTER
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDATA
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDATAEND
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDATAFIPS
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDATAFIPSEND
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDATAFIPSSTART
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDWARFABSFCN
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDWARFCONST
DWARF symbol types
const SDWARFCUINFO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDWARFFCN
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDWARFLINES
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDWARFLOC
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDWARFRANGE
Sections for debugging information
const SDWARFSECT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDWARFTYPE
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDWARFVAR
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SDYNIMPORT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SELFGOT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SELFRELROSECT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SELFROSECT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SELFRXSECT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SELFSECT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SFILEPATH
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SFIPSINFO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SFUNCTAB
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SFUNCTABRELRO
Writable sections.
const SFirstWritable
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SGCBITS
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SGCBITSRELRO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SGOFUNC
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SGOFUNCRELRO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SGOSTRING
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SGOSTRINGRELRO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SHOSTOBJ
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SINITARR
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SITABLINK
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SLIBFUZZER_8BIT_COUNTER
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SMACHO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SMACHOGOT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SMACHOINDIRECTGOT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SMACHOINDIRECTPLT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SMACHOPLT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SMACHOSYMSTR
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SMACHOSYMTAB
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SNOPTRBSS
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SNOPTRDATA
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SNOPTRDATAEND
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SNOPTRDATAFIPS
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SNOPTRDATAFIPSEND
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SNOPTRDATAFIPSSTART
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SPCLNTAB
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SRODATA
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SRODATAEND
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SRODATAFIPS
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SRODATAFIPSEND
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SRODATAFIPSSTART
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SRODATARELRO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SSEHSECT
SEH symbol types
const SSEHUNWINDINFO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SSTRING
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SSTRINGRELRO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SSYMTAB
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const STEXT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const STEXTEND
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const STEXTFIPS
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const STEXTFIPSEND
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const STEXTFIPSSTART
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const STLSBSS
Read-only sections.
const STYPE
Part of .data.rel.ro if it exists, otherwise part of .rodata.
const STYPELINK
Read-only sections with relocations. Types STYPE-SFUNCTAB above are written to the .rodata section by default. When linking a shared object, some conceptually "read only" types need to be written to by relocations and putting them in a section called ".rodata" interacts poorly with the system linkers. The GNU linkers support this situation by arranging for sections of the name ".data.rel.ro.XXX" to be mprotected read only by the dynamic linker after relocations have applied, so when the Go linker is creating a shared object it checks all objects of the above types and bumps any object that has a relocation to it to the corresponding type below, which are then written to sections with appropriate magic names.
const STYPERELRO
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SUNDEFEXT
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SWINDOWS
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SXCOFFTOC
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const SXREF
Defined SymKind values. TODO(rsc): Give idiomatic Go names. go:generate stringer -type=SymKind
const Sxxx SymKind = iota
const SymVerABI0 = 0
const SymVerABICount = 2
const SymVerABIInternal = 1
const SymVerStatic = 10
var _SymKind_index = [...]uint16{...}
const _SymKind_name = "SxxxSTEXTSTEXTFIPSSTARTSTEXTFIPSSTEXTFIPSENDSTEXTENDSELFRXSECTSMACHOPLTSTYPESSTRINGSGOSTRINGSGOFUNCSGCBITSSRODATASRODATAFIPSSTARTSRODATAFIPSSRODATAFIPSENDSRODATAENDSFUNCTABSELFROSECTSTYPERELROSSTRINGRELROSGOSTRINGRELROSGOFUNCRELROSGCBITSRELROSRODATARELROSFUNCTABRELROSELFRELROSECTSTYPELINKSITABLINKSSYMTABSPCLNTABSFirstWritableSBUILDINFOSFIPSINFOSELFSECTSMACHOSMACHOGOTSWINDOWSSELFGOTSNOPTRDATASNOPTRDATAFIPSSTARTSNOPTRDATAFIPSSNOPTRDATAFIPSENDSNOPTRDATAENDSINITARRSDATASDATAFIPSSTARTSDATAFIPSSDATAFIPSENDSDATAENDSXCOFFTOCSBSSSNOPTRBSSSLIBFUZZER_8BIT_COUNTERSCOVERAGE_COUNTERSCOVERAGE_AUXVARSTLSBSSSXREFSMACHOSYMSTRSMACHOSYMTABSMACHOINDIRECTPLTSMACHOINDIRECTGOTSFILEPATHSDYNIMPORTSHOSTOBJSUNDEFEXTSDWARFSECTSDWARFCUINFOSDWARFCONSTSDWARFFCNSDWARFABSFCNSDWARFTYPESDWARFVARSDWARFRANGESDWARFLOCSDWARFLINESSSEHUNWINDINFOSSEHSECT"
LoaderSym holds a loader.Sym value. We can't refer to this type from the sym package since loader imports sym.
type LoaderSym uint32
RelocVariant is a linker-internal variation on a relocation.
type RelocVariant uint8
A SymKind describes the kind of memory represented by a symbol.
type SymKind uint8
A CompilationUnit represents a set of source files that are compiled together. Since all Go sources in a Go package are compiled together, there's one CompilationUnit per package that represents all Go sources in that package, plus one for each assembly file. Equivalently, there's one CompilationUnit per object file in each Library loaded by the linker. These are used for both DWARF and pclntab generation.
type CompilationUnit struct {
Lib *Library
PclnIndex int
PCs []dwarf.Range
DWInfo *dwarf.DWDie
FileTable []string
Consts LoaderSym
FuncDIEs []LoaderSym
VarDIEs []LoaderSym
AbsFnDIEs []LoaderSym
RangeSyms []LoaderSym
Textp []LoaderSym
}
type Library struct {
Objref string
Srcref string
File string
Pkg string
Shlib string
Fingerprint goobj.FingerprintType
Autolib []goobj.ImportedPkg
Imports []*Library
Main bool
Units []*CompilationUnit
Textp []LoaderSym
DupTextSyms []LoaderSym
}
type Section struct {
Rwx uint8
Extnum int16
Align int32
Name string
Vaddr uint64
Length uint64
Seg *Segment
Elfsect interface{}
Reloff uint64
Rellen uint64
Relcount uint32
Sym LoaderSym
Index uint16
Compressed bool
}
type Segment struct {
Rwx uint8
Vaddr uint64
Length uint64
Fileoff uint64
Filelen uint64
Sections []*Section
}
func ABIToVersion(abi obj.ABI) int
IsDATA returns true if t is one of the SDATA types.
func (t SymKind) IsDATA() bool
func (t SymKind) IsDWARF() bool
IsData returns true if t is any kind of data type.
func (t SymKind) IsData() bool
IsNOPTRDATA returns true if t is one of the SNOPTRDATA types.
func (t SymKind) IsNOPTRDATA() bool
IsRODATA returns true if t is one of the SRODATA types.
func (t SymKind) IsRODATA() bool
IsText returns true if t is a text type.
func (t SymKind) IsText() bool
func RelocName(arch *sys.Arch, r objabi.RelocType) string
func (i SymKind) String() string
func (l Library) String() string
func VersionToABI(v int) (obj.ABI, bool)
func _()
Generated with Arrow