ELF_GETVERSION(3) Library Functions Manual ELF_GETVERSION(3)

elf_getversion — retrieve the operating version for an ELF object

ELF Access Library (libelf, -lelf)

#include <libelf.h>

unsigned int
elf_getversion(Elf *elf);

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

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

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

This function can fail with the following errors:

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

elf(3), elf_errno(3), elf_version(3)

December 22, 2025 NetBSD 11.99