elf_end(S)
elf_end --
finish using an object file
Syntax
cc [flag . . . ] file . . . -lelf [library] . . .
#include <libelf.h>
int elf_end(Elf *elf);
Description
A program uses
elf_end(S)
to terminate an
ELF
descriptor,
elf,
and to deallocate data associated with the descriptor.
Until the program terminates a descriptor, the
data remain allocated.
elf
should be a value previously returned by
elf_begin(S);
a null pointer is allowed as an argument, to simplify error handling.
If the program wishes to write data associated with the
ELF
descriptor to the file, it must use
elf_update(S)
before calling
elf_end( ).
As
elf_begin(S)
explains, a descriptor can have more than one activation.
Calling
elf_end( )
removes one activation and returns the remaining activation count.
The library does not
terminate the descriptor until the activation count reaches zero.
Return values
A zero return value indicates that the
ELF
descriptor is no longer valid.
Diagnostics
Error conditions are identified through the routine
elf_error(S).
See also
elf(S),
elf_begin(S),
elf_update(S)
Standards conformance
elf_end(S)
is not part of any currently supported standard;
it was developed by UNIX System Laboratories, Inc.
and is maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003