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

NAME

6       elf_getarsym - retrieve archive symbol table
7

SYNOPSIS

9       cc [ flag ... ] file ... -lelf [ library ... ]
10       #include <libelf.h>
11
12       Elf_Arsym *elf_getarsym(Elf *elf, size_t *ptr);
13
14

DESCRIPTION

16       The elf_getarsym() function returns a pointer to the archive symbol ta‐
17       ble, if one is available for the ELF descriptor elf. Otherwise, the ar‐
18       chive  doesn't have a symbol table, an error occurred, or elf was null;
19       elf_getarsym() then returns a null value. The symbol table is an  array
20       of structures that include the following members.
21
22         char *as_name;
23         size_t    as_off;
24         unsigned long  as_hash;
25
26
27
28       These members have the following semantics:
29
30       as_name    A pointer to a null-terminated symbol name resides here.
31
32
33       as_off     This  value  is  a byte offset from the beginning of the ar‐
34                  chive to the member's header. The archive member residing at
35                  the  given  offset  defines the associated symbol. Values in
36                  as_off  may  be  passed  as  arguments  to  elf_rand().  See
37                  elf_begin(3ELF) to access the desired archive member.
38
39
40       as_hash    This   is  a  hash  value  for  the  name,  as  computed  by
41                  elf_hash().
42
43
44
45       If ptr is non-null, the library stores the number of table  entries  in
46       the  location  to  which  ptr  points.  This value is set to 0 when the
47       return value is NULL. The table's last entry, which is included in  the
48       count,  has  a  null  as_name,  a  zero  value for as_off, and ~0UL for
49       as_hash.
50
51
52       The hash value returned is guaranteed not to be the bit pattern of  all
53       ones ( ~0UL).
54

ATTRIBUTES

56       See attributes(5) for descriptions of the following attributes:
57
58
59
60
61       ┌─────────────────────────────┬─────────────────────────────┐
62       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
63       ├─────────────────────────────┼─────────────────────────────┤
64       │Interface Stability          │Stable                       │
65       ├─────────────────────────────┼─────────────────────────────┤
66       │MT-Level                     │MT-Safe                      │
67       └─────────────────────────────┴─────────────────────────────┘
68

SEE ALSO

70       ar.h(3HEAD),     elf(3ELF),     elf_begin(3ELF),    elf_getarhdr(3ELF),
71       elf_hash(3ELF), libelf(3LIB), attributes(5)
72
73
74
75SunOS 5.11                        11 Jul 2001               elf_getarsym(3ELF)
Impressum