---
name: "PR_GET_AUXV"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/PR_GET_AUXV"
---

# PR\_GET\_AUXV(2const)

get the auxiliary vector

## NAME

PR\_GET\_AUXV - get the auxiliary vector

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>
```

**int prctl(**size\_t size;           **PR\_GET\_AUXV, void** *auxv***\[***size***\], unsigned long** *size***, 0L, 0L);**

## DESCRIPTION

Get the auxiliary vector (auxv) into the buffer pointed to by *auxv*, whose size is given by *size*.

If the buffer is not long enough for the full auxiliary vector, the copy will be truncated.

## RETURN VALUE

On success, this call returns the full size of the auxiliary vector. On error, -1 is returned, and *errno* is set to indicate the error.

## ERRORS

- **EFAULT**

  *auxv* is an invalid address.

## STANDARDS

Linux.

## HISTORY

Linux 6.4.

## SEE ALSO

[**prctl**(2)](/prctl/2.md)
