getauxval.3: Correct AT_HWCAP result description

The getauxval(3) man page describes the result for AT_HWCAP as
"A pointer to a multibyte mask of bits", however the actual value
returned is not a pointer, but simply the first 32 bits of the
capabilities mask.

This can be observed directly. Note the value shown for AT_HWCAP
is a 32 bit value that is not a pointer (see AT_PHDR or AT_RANDOM
for how pointers are shown).

% LD_SHOW_AUXV=1 cat < /dev/null
AT_SYSINFO_EHDR: 0x7fffe89fe000
AT_HWCAP:        bfebfbff
AT_PAGESZ:       4096
AT_CLKTCK:       100
AT_PHDR:         0x400040
AT_PHENT:        56
AT_PHNUM:        9
AT_BASE:         0x0
AT_FLAGS:        0x0
AT_ENTRY:        0x402634
AT_UID:          515
AT_EUID:         515
AT_GID:          114
AT_EGID:         114
AT_SECURE:       0
AT_RANDOM:       0x7fffe8917be9
AT_EXECFN:       /usr/bin/cat
AT_PLATFORM:     x86_64
This commit is contained in:
Cownie, James H 2016-07-12 16:35:43 +00:00 committed by Michael Kerrisk
parent 8c74a1cea4
commit 063bf5a777
1 changed files with 3 additions and 2 deletions

View File

@ -101,12 +101,13 @@ performed by the kernel.
The real group ID of the thread.
.TP
.BR AT_HWCAP
A pointer to a multibyte mask of bits whose settings
A four byte long bit-mask whose settings
indicate detailed processor capabilities.
The contents of the bit mask are hardware dependent
(for example, see the kernel source file
.IR arch/x86/include/asm/cpufeature.h
for details relating to the Intel x86 architecture).
for details relating to the Intel x86 architecture; the value
returned is the first 32 bit word of the array described there).
A human-readable version of the same information is available via
.IR /proc/cpuinfo .
.TP