Document required size of buffer for elf_aux_info(3).

PR:	241884
Reported by:	jbeich
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D22380
This commit is contained in:
Konstantin Belousov 2019-11-17 14:11:08 +00:00
parent d3276301ab
commit 7ce4a1458e

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd November 13, 2019
.Dd November 17, 2019
.Dt ELF_AUX_INFO 3
.Os
.Sh NAME
@ -44,29 +44,41 @@ function retrieves the auxiliary info vector requested in
The information is stored into the provided buffer if it will fit.
The following values, defined in
.In sys/elf_common.h
can be requested:
can be requested (corresponding buffer sizes are specified in parenthesis):
.Bl -tag -width AT_OSRELDATE
.It AT_CANARY
The canary value for SSP.
The canary value for SSP (arbitrary sized buffer, as many bytes are
returned as it fits into it, rest is zeroed).
.It AT_EXECPATH
The path of executed program.
The path of executed program
.Dv (MAXPATHLEN).
This may not be present if the process was initialized by
.Xr fexecve 2
and the namecache no longer contains the file's name.
.It AT_HWCAP
CPU / hardware feature flags.
CPU / hardware feature flags
.Dv (sizeof(u_long)).
.It AT_HWCAP2
CPU / hardware feature flags.
CPU / hardware feature flags
.Dv (sizeof(u_long)).
.It AT_NCPUS
Number of CPUs.
Number of CPUs
.Dv (sizeof(int)).
.It AT_OSRELDATE
Kernel OSRELDATE.
The
.Dv OSRELDATE
of the kernel or jail the program is running on
.Dv (sizeof(int)).
.It AT_PAGESIZES
Vector of page sizes.
Vector of page sizes (arbitrary sized buffer, as many elements of the
.Dv pagesizes
array are returned as it fits).
.It AT_PAGESZ
Page size in bytes.
Page size in bytes
.Dv (sizeof(int)).
.It AT_TIMEKEEP
Pointer to VDSO timehands (for library internal use).
Pointer to VDSO timehands (for library internal use,
.Dv sizeof(void *)).
.El
.Sh RETURN VALUES
Returns zero on success, or an error number on failure.