ELF_GETVERSION(3)

NAME
elf_getversion - retrieve the operating version for an ELF object

LIBRARY
libelf

SYNOPSIS
#include <libelf.h>
unsigned int
elf_getversion(Elf *elf);

DESCRIPTION
Important: The function elf_getversion() is an extension to the ELF(3) API. Applications that need to be portable to other implementations of libelf should take care not to use this function.

The function elf_getversion() returns the operating version for the ELF descriptor pointed to by argument elf.

This descriptor must have been allocated by a previous call to one of the functions that return an ELF descriptor, such as elf_begin(3), elf_memory(3), elf_open(3) and elf_openmemory(3). The object associated with the descriptor elf should be an ELF object.

RETURN VALUES
The function returns the operating version for the ELF object if successful or EV_NONE if an error occurred.

COMPATIBILITY
This function is an extension to the ELF(3) API set.

ERRORS
This function can fail with the following errors:

[ELF_E_ARGUMENT]
    The argument elf was NULL.

[ELF_E_ARGUMENT]
    The underlying object referenced by the descriptor elf was not an ELF object.

SEE ALSO
elf(3), elf_begin(3), elf_errno(3), elf_version(3)