GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ELF_AUX_INFO(3) FreeBSD Library Functions Manual ELF_AUX_INFO(3)

elf_aux_info
extract data from the elf auxiliary vector of the current process

Standard C Library (libc, -lc)

#include <sys/auxv.h>

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

The elf_aux_info() function retrieves the auxiliary info vector requested 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 running on (sizeof(int)).
AT_PAGESIZES
Vector of page sizes (arbitrary sized buffer, as many elements 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 *)).

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

[]
An unknown item was requested.
[]
The provided buffer was not the right size for the requested item.
[]
The requested item is not available.

The elf_aux_info() function appeared in FreeBSD 12.0.

Only a small subset of available auxiliary info vector items are accessible with this function. Some items require a "right-sized" buffer while others just require a "big enough" buffer.
November 17, 2019 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.