Updated: 2025/Dec/31

Please read Privacy Policy. It's for your privacy.


ELF_GETVERSION(3)          Library Functions Manual          ELF_GETVERSION(3)

NAME
     elf_getversion - retrieve the operating version for an ELF object

LIBRARY
     ELF Access Library (libelf, -lelf)

SYNOPSIS
     #include <libelf.h>

     unsigned int
     elf_getversion(Elf *elf);

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

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_errno(3), elf_version(3)

NetBSD 11.99                   December 22, 2025                  NetBSD 11.99