File: elf_getarhdr.3

package info (click to toggle)
elfutils 0.194-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 27,680 kB
  • sloc: ansic: 114,970; sh: 35,537; cpp: 4,998; makefile: 1,986; yacc: 1,388; lex: 130; asm: 77; sed: 39; awk: 35
file content (78 lines) | stat: -rw-r--r-- 1,596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
.TH ELF_GETARHDR 3 2025-06-06 "Libelf" "Libelf Programmer's Manual"

.SH NAME
elf_getarhdr \- retrieve archive member header information

.SH SYNOPSIS
.nf
.B #include <libelf.h>

.BI "Elf_Arhdr *elf_getarhdr(Elf *" elf ");"
.fi

.SH DESCRIPTION
Return a
.B Elf_Arhdr *
describing the archive header of the archive member currently referred
to by an ELF descriptor.

The
.B Elf_Arhdr
structure is defined as:

.P
.nf
typedef struct {
  char *ar_name;                /* Name of archive member.  */
  time_t ar_date;               /* File date.  */
  uid_t ar_uid;                 /* User ID.  */
  gid_t ar_gid;                 /* Group ID.  */
  mode_t ar_mode;               /* File mode.  */
  int64_t ar_size;              /* File size.  */
  char *ar_rawname;             /* Original name of archive member.  */
} Elf_Arhdr;
.fi

.SH PARAMETERS
.TP
.I elf
An ELF descriptor referring to a member of an archive file.

.SH RETURN VALUE
If
.I elf
refers to an archive member,
.B elf_getarhdr()
returns a pointer to its archive header.
This pointer is valid until
.I elf
or the parent archive Elf descriptor are closed using
.BR elf_end() .
If
.I elf
does not refer to an archive member or the header cannot be
acquired then NULL is returned.

.SH SEE ALSO
.BR elf_begin (3),
.BR elf_getaroff (3),
.BR elf_next (3),
.BR elf_rand (3),
.BR libelf (3),
.BR elf (5)

.SH ATTRIBUTES
.TS
allbox;
lbx lb lb
l l l.
Interface	Attribute	Value
T{
.na
.nh
.BR elf_getarhdr ()
T}	Thread safety	MT-safe
.TE

.SH REPORTING BUGS
Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/.