OpenBSD manual page server

Manual Page Search Parameters

ELF_END(3) Library Functions Manual ELF_END(3)

elf_endrelease an ELF descriptor

library “libelf”

#include <libelf.h>

int
elf_end(Elf *elf);

Function () is used to release the resources associated with an ELF descriptor pointed to by argument elf. This descriptor must have been allocated by a previous call to elf_begin(3) or elf_memory(3). For programming convenience, a NULL value is permitted for argument elf.

A call to () decrements the activation count for descriptor elf by one. The resources associated with the descriptor are only released with its activation count goes to zero.

Once function () returns zero, the ELF descriptor elf will no longer be valid and should not be used further.

Function elf_end() returns the current value of the ELF descriptor elf's activation count, or zero if argument elf was NULL.

elf(3), elf_begin(3), elf_memory(3), gelf(3)

June 29, 2006 OpenBSD-current