Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
ELF_AUX_INFO(3)		    Library Functions Manual	       ELF_AUX_INFO(3)

NAME
       elf_aux_info  --	extract	data from the elf auxiliary vector of the cur-
       rent process

LIBRARY
       Standard	C Library (libc, -lc)

SYNOPSIS
       #include	<sys/auxv.h>

       int
       elf_aux_info(int	aux, void *buf,	int buflen);

DESCRIPTION
       The elf_aux_info() function retrieves the  auxiliary  info  vector  re-
       quested	in aux.	 The information is stored into	the provided buffer if
       it will fit.  The following values, defined in  <sys/elf_common.h>  can
       be requested (corresponding buffer sizes	are specified in parenthesis):

       AT_CANARY     The canary	value for SSP (arbitrary sized buffer, as many
		     bytes are returned	as it fits into	it, rest is zeroed).

       AT_EXECPATH   The  path	of executed program (MAXPATHLEN). This may not
		     be	present	if the process was initialized	by  fexecve(2)
		     and the namecache no longer contains the file's name.

       AT_HWCAP	     CPU / hardware feature flags (sizeof(u_long)).

       AT_HWCAP2     CPU / hardware feature flags (sizeof(u_long)).

       AT_NCPUS	     Number of CPUs (sizeof(int)).

       AT_OSRELDATE  The  OSRELDATE  of	the kernel or jail the program is run-
		     ning on (sizeof(int)).

       AT_PAGESIZES  Vector of page sizes (arbitrary sized buffer, as many el-
		     ements of the pagesizes array are returned	as it fits).

       AT_PAGESZ     Page size in bytes	(sizeof(int)).

       AT_TIMEKEEP   Pointer to	VDSO  timehands	 (for  library	internal  use,
		     sizeof(void *)).

       AT_USRSTACKBASE
		     Top of the	user stack for main thread.

       AT_USRSTACKLIM
		     Limit for grow of the user	stack for main thread.

RETURN VALUES
       Returns zero on success,	or an error number on failure.

ERRORS
       [EINVAL]		  An unknown item was requested.

       [EINVAL]		  The  provided	 buffer	was not	the right size for the
			  requested item.

       [ENOENT]		  The requested	item is	not available.

HISTORY
       The elf_aux_info() function appeared in FreeBSD 12.0.

BUGS
       Only a small subset of available	auxiliary info vector items are	acces-
       sible with this function.  Some items require  a	 "right-sized"	buffer
       while others just require a "big	enough"	buffer.

FreeBSD	13.2		      September	16, 2022	       ELF_AUX_INFO(3)

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | HISTORY | BUGS

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=elf_aux_info&sektion=3&manpath=FreeBSD+14.0-RELEASE+and+Ports>

home | help