In our implementation of the ELF(3) API, functions elf_getshnum()
and elf_getshstrndx()
return zero in case of an error and non-zero in case of success. This behaviour is consistent with that of the ELF(3) implementations from the OpenSolaris and GNU projects.
In contrast, the similarly named functions in Red Hat elfutils return -1 in the case of an error and zero otherwise.
New APIs elf_getshdrnum()
, elf_getshdrstrndx()
, and elf_getphdrnum()
have been added to libelf
.
elf_getshnum()
, elf_getshstrndx()
and elf_getphnum()
in favour of three new APIs elf_getshdrnum()
, elf_getshdrstrndx()
, and elf_getphdrnum()
respectively. The new functions will return -1 in case of error, and zero otherwise.