Documentation ¶
Overview ¶
Package vdso provides the binary level virtual dynamic shared object (vDSO).
Index ¶
Constants ¶
View Source
const ( // ArrayMax is the byte-size of a maximally sized array on this architecture. ArrayMax = 1<<50 - 1 // Maximum indices for the array types used when traversing the vDSO ELF structures. SymTabSize = ArrayMax / unsafe.Sizeof(elfdef.Sym{}) DynSize = ArrayMax / unsafe.Sizeof(elfdef.Dyn{}) SymStringsSize = ArrayMax // byte VerSymSize = ArrayMax / 2 // uint16 HashSize = ArrayMax / 4 // uint32 // BloomSizeScale is a scaling factor for gnuhash tables which are uint32 indexed, but contain uintptrs. BloomSizeScale = unsafe.Sizeof(uintptr(0)) / 4 // uint32 )
Variables ¶
View Source
var ( GettimeofdaySym uintptr = 0xffffffffff600000 ClockgettimeSym uintptr = 0 )
initialize with vsyscall fallbacks.
View Source
var LinuxVersion = VersionKey{"LINUX_2.6", 0x3ae75f6}
LinuxVersion version of Linux Kernel in vDSO object.
View Source
var SymbolKeys = []SymbolKey{ {"__vdso_gettimeofday", 0x315ca59, 0xb01bca00, &GettimeofdaySym}, {"__vdso_clock_gettime", 0xd35ec75, 0x6e43a318, &ClockgettimeSym}, }
SymbolKeys is the Linux amd64 vDSO symbol keys.
Functions ¶
func FindVersion ¶
func FindVersion(vdso *VDSO, ver *VersionKey) int32
FindVersion finds version from vDSO.
func InVDSOPage ¶
InVDSOPage reports whether the pc is on the VDSO page.
func InitFromSysinfoELFHeader ¶
InitFromSysinfoELFHeader init vDSO from hdr.
func ParseSymbols ¶
ParseSymbols parses and allocates symbols from vDSO.
Types ¶
type VDSO ¶
type VDSO struct { Valid bool // Load information LoadAddr uintptr LoadOffset uintptr // LoadAddr - recorded vaddr // Symbol table Symtab *[SymTabSize]elfdef.Sym Symstrings *[SymStringsSize]byte Chain []uint32 Bucket []uint32 SymOff uint32 IsGNUHash bool // Version table Versym *[VerSymSize]uint16 Verdef *elfdef.Verdef }
VDSO represents a vDSO object.
type VersionKey ¶
VersionKey represents a vDSO Version key entries.
Click to show internal directories.
Click to hide internal directories.