This function returns a value identifying the kind of
file associated with an
ELF
descriptor
elf.
(See ``Return values''.)
Other values are reserved, to be assigned to new kinds of files.
elf
should be a value previously returned by
elf_begin(S-osr5).
A null pointer is allowed, to simplify error handling; it makes
elf_kind(S-osr5)
return
ELF_K_NONE.
Return values
Currently defined values appear below.
ELF_K_AR
The file is an archive (see
ar(FP)).
An
ELF
descriptor may also be associated with an archive
member,
not the archive itself, and then
elf_kind( )
identifies the member's type.
ELF_K_COFF
The file is a
COFF
object file.
elf_begin( )
describes the library's handling for
COFF
files.
ELF_K_ELF
The file is an
ELF
file.
The program can use
elf_getident(S-osr5)
to determine the class.
You can use other functions, such as
elf_getehdr(S-osr5),
to retrieve other file information.
ELF_K_NONE
This indicates a kind of file unknown to the library.
Diagnostics
Error conditions are identified through the routine
elf_error(S-osr5).