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

# NAME

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

# 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 requested in aux. The information is stored into the provided buffer if it will fit. The following values can be requested (corresponding buffer sizes are specified in parenthesis):

AT_HWCAP
  CPU / hardware feature flags `(sizeof(unsigned long))`.
AT_HWCAP2
  CPU / hardware feature flags `(sizeof(unsigned long))`.
AT_PAGESZ
  Page size in bytes `(sizeof(int))`.

# 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 and was first available in OpenBSD 7.6.

July 14, 2024 | Debian