ELF_ERRNO(3) Libelf Programmer's Manual ELF_ERRNO(3)

elf_errno - retrieve the error code of the last failing libelf function call.

#include <libelf.h>

int elf_errno(void);

The elf_errno function retrieves the error code of the last failing libelf library function. This error code indicates the type of error that occurred during the failing function call. Each thread maintains its own separate error code.

This function does not take any parameters.

The elf_errno function returns an integer representing the most recent error code for the current thread. If no error has occurred, it returns 0. If an error occurred, the function returns a non-zero error code that corresponds to the specific error. Error codes can be passed to elf_errmsg in order to create a string describing the error.

elf_errmsg(3)

Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.

2024-06-24 Libelf