#[repr(usize)]pub enum AuxType {
Show 30 variants
Null = 0,
Ignore = 1,
ExecFd = 2,
Phdr = 3,
Phent = 4,
Phnum = 5,
PageSize = 6,
Base = 7,
Flags = 8,
Entry = 9,
NotElf = 10,
UID = 11,
EUID = 12,
GID = 13,
EGID = 14,
Platform = 15,
HwCap = 16,
ClkTck = 17,
FpuCw = 18,
DCacheBSize = 19,
ICacheBSize = 20,
UCacheBSize = 21,
IgnorePPC = 22,
Secure = 23,
BasePlatform = 24,
Random = 25,
HwCap2 = 26,
ExecFn = 31,
SysInfo = 32,
SysInfoEhdr = 33,
}
Expand description
ELF auxiliary vector (auxv) entry type
MUSL: https://github.com/bminor/musl/blob/c47ad25ea3b484e10326f933e927c0bc8cded3da/include/elf.h#L1001
Variants§
Null = 0
结束标志
Ignore = 1
被忽略的项
ExecFd = 2
文件描述符(指向可执行文件),在内核加载器中用
Phdr = 3
程序头表(Program Header Table)在内存中的地址
Phent = 4
每个程序头的大小(以字节为单位)
Phnum = 5
程序头的数量
PageSize = 6
页大小(单位字节),如 4096
Base = 7
动态链接器的基址(即 ld.so 的加载地址)
Flags = 8
运行时标志,通常为 0
Entry = 9
程序入口点(Entry Point)
NotElf = 10
如果是非 ELF 二进制(a.out 格式),为 1,否则为 0
UID = 11
实际用户 ID(UID)
EUID = 12
有效用户 ID(EUID)
GID = 13
实际组 ID(GID)
EGID = 14
有效组 ID(EGID)
Platform = 15
CPU 平台名称的指针(如 “x86_64”)
HwCap = 16
硬件能力位(bitmask),如 SSE/AVX 支持
ClkTck = 17
每秒的时钟滴答数(用于 times()
等函数)
FpuCw = 18
x86 FPU 控制字(FPUCW)
DCacheBSize = 19
D-cache(数据缓存)大小
ICacheBSize = 20
I-cache(指令缓存)大小
UCacheBSize = 21
通用缓存大小
IgnorePPC = 22
PowerPC 平台专用,被忽略
Secure = 23
是否是安全模式(非 suid/guid),0 = 否,1 = 是
BasePlatform = 24
基础平台名称的指针(字符串)
Random = 25
指向随机数种子(stack 上的 16 字节随机值)
HwCap2 = 26
第二组 HWCAP(arm64/aarch64)
ExecFn = 31
命令行中可执行文件路径的地址(如 “/bin/ls”)
SysInfo = 32
指向 vsyscall 区域的函数地址(如 gettimeofday()
)
SysInfoEhdr = 33
指向 VDSO ELF 映射的起始地址
Trait Implementations§
Source§impl Ord for AuxType
impl Ord for AuxType
Source§impl PartialOrd for AuxType
impl PartialOrd for AuxType
impl Copy for AuxType
impl Eq for AuxType
impl StructuralPartialEq for AuxType
Auto Trait Implementations§
impl Freeze for AuxType
impl RefUnwindSafe for AuxType
impl Send for AuxType
impl Sync for AuxType
impl Unpin for AuxType
impl UnwindSafe for AuxType
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)