logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

elf_errmsg - return the error message string for a given libelf error code.

Description

The elf_errmsg function retrieves a human-readable string corresponding to the most recent error code set by a libelf library function. If err is 0, the function returns the error message for the most recent error code. If err is non-zero, the function returns the error message for the specified error code.

Name

elf_errmsg - return the error message string for a given libelf error code.

Parameters

err An int value specifying the error code. If this value is 0, the function returns the error message for the most recent error or NULL if none occurred. If this value is -1, the behaviour is similar to the previous case except that a legal string will be returned instead of NULL.

Reporting Bugs

Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/. Libelf 2024-06-24 ELF_ERRMSG(3)

Return Value

The elf_errmsg function returns a string containing the error message. If there is no corresponding error message, it returns NULL.

See Also

elf_errno(3)

Synopsis

#include<libelf.h>constchar*elf_errmsg(interr);

See Also