1elf_kind(3ELF)               ELF Library Functions              elf_kind(3ELF)
2
3
4

NAME

6       elf_kind - determine file type
7

SYNOPSIS

9       cc [ flag ... ] file ... -lelf [ library ... ]
10       #include <libelf.h>
11
12       Elf_Kind elf_kind(Elf *elf);
13
14

DESCRIPTION

16       This  function  returns a value identifying the kind of file associated
17       with an ELF descriptor (elf). Defined values are below:
18
19       ELF_K_AR      The file is an archive [see ar.h(3HEAD)]. An ELF descrip‐
20                     tor  may  also  be associated with an archive member, not
21                     the archive itself, and then  elf_kind()  identifies  the
22                     member's type.
23
24
25       ELF_K_COFF    The file is a COFF object file. elf_begin(3ELF) describes
26                     the library's handling for COFF files.
27
28
29       ELF_K_ELF     The file is an ELF file. The program  may  use  elf_geti‐
30                     dent()  to  determine the class. Other functions, such as
31                     elf32_getehdr(), are available  to  retrieve  other  file
32                     information.
33
34
35       ELF_K_NONE    This indicates a kind of file unknown to the library.
36
37
38
39       Other  values  are  reserved,  to be assigned as needed to new kinds of
40       files. elf should be a value previously returned by elf_begin(). A null
41       pointer  is  allowed, to simplify error handling, and causes elf_kind()
42       to return ELF_K_NONE.
43

ATTRIBUTES

45       See attributes(5) for descriptions of the following attributes:
46
47
48
49
50       ┌─────────────────────────────┬─────────────────────────────┐
51       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
52       ├─────────────────────────────┼─────────────────────────────┤
53       │Interface Stability          │Stable                       │
54       ├─────────────────────────────┼─────────────────────────────┤
55       │MT-Level                     │MT-Safe                      │
56       └─────────────────────────────┴─────────────────────────────┘
57

SEE ALSO

59       ar.h(3HEAD), elf(3ELF), elf32_getehdr(3ELF), elf_begin(3ELF), elf_geti‐
60       dent(3ELF), libelf(3LIB), attributes(5)
61
62
63
64SunOS 5.11                        11 Jul 2001                   elf_kind(3ELF)
Impressum