haskus-system-0.7.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.System.Linux.Process.Auxiliary

Contents

Description

Auxiliary vector

The kernel's ELF binary loader passes some information to user space into the "auxiliary vector" when a program is executed. It is just a key-value array stored alongside program parameters and environment.

The libc exports a "getauxval" function that we use to query a value by key in the auxiliary vector.

Synopsis

Documentation

data AuxKey Source #

Keys for the entries in the auxiliary table put on the initial stack

Constructors

AuxFileDescriptor

file descriptor of program

AuxHeaders

program headers for program

AuxHeaderEntrySize

size of program header entry

AuxHenderEntryCount

number of program headers

AuxPageSize

system page size

AuxInterpreterAddr

base address of interpreter

AuxFlags

flags

AuxEntryPoint

entry point of program

AuxIsNotELF

program is not ELF

AuxUID

real uid

AuxEUID

effective uid

AuxGID

real gid

AuxEGID

effective gid

AuxPlatform

string identifying CPU for optimizations

AuxHardwareHints

arch dependent hints at CPU capabilities

AuxClockTickFrequency

frequency at which times() increments

AuxIsSecure

secure mode boolean

AuxRealPlatform

string identifying real platform, may differ from AuxPlatform

AuxRandomBytes

address of 16 random bytes

AuxHardwareHints2

extension of AT_HWCAP

AuxFilename

filename of program

AuxVDSOAddr

address of the vDSO page

getAuxiliaryValue :: AuxKey -> Word64 Source #

Get the value associated with a key in the auxiliary vector

Helpers

getFileDescriptor :: Handle Source #

File decriptor of the program

getVDSOAddr :: Word64 Source #

Address of the vDSO page