kernel: bwrite_common's 3rd & 4th args can be bools
[unleashed.git] / share / man / man3elf / elf_getarhdr.3elf
blob4263898e03170efa37fbeb1c56d203872e32a539
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 2001, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ELF_GETARHDR 3ELF "Jul 11, 2001"
7 .SH NAME
8 elf_getarhdr \- retrieve archive member header
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR... ]
13 #include <libelf.h>
15 \fBElf_Arhdr *\fR\fBelf_getarhdr\fR(\fBElf *\fR\fIelf\fR);
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 \fBelf_getarhdr()\fR returns a pointer to an archive member header, if one is
22 available for the \fBELF\fR descriptor \fIelf\fR. Otherwise, no archive member
23 header exists, an error occurred, or \fIelf\fR was null; \fBelf_getarhdr()\fR
24 then returns a null value. The header includes the following members.
25 .sp
26 .in +2
27 .nf
28 \fBchar *ar_name;
29 time_t  ar_date;
30 uid_t   ar_uid;
31 gid_t   ar_gid;
32 mode_t  ar_mode;
33 off_t   ar_size;
34 char    *ar_rawname;\fR
35 .fi
36 .in -2
38 .sp
39 .LP
40 An archive member name, available through \fBar_name\fR, is a null-terminated
41 string, with the \fBar\fR format control characters removed. The
42 \fBar_rawname\fR member holds a null-terminated string that represents the
43 original name bytes in the file, including the terminating slash and trailing
44 blanks as specified in the archive format.
45 .sp
46 .LP
47 In addition to ``regular'' archive members, the archive format defines some
48 special members. All special member names begin with a slash (\fB/\fR),
49 distinguishing them from regular members (whose names may not contain a slash).
50 These special members have the names (\fBar_name\fR) defined below.
51 .sp
52 .ne 2
53 .na
54 \fB\fB/\fR\fR
55 .ad
56 .RS 6n
57 This is the archive symbol table. If present, it will be the first archive
58 member. A program may access the archive symbol table through
59 \fBelf_getarsym()\fR. The information in the symbol table is useful for random
60 archive processing (see \fBelf_rand()\fR on \fBelf_begin\fR(3ELF)).
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fB//\fR\fR
67 .ad
68 .RS 6n
69 This member, if present, holds a string table for long archive member names. An
70 archive member's header contains a 16-byte area for the name, which may be
71 exceeded in some file systems. The library automatically retrieves long member
72 names from the string table, setting \fBar_name\fR to the appropriate value.
73 .RE
75 .sp
76 .LP
77 Under some error conditions, a member's name might not be available. Although
78 this causes the library to set \fBar_name\fR to a null pointer, the
79 \fBar_rawname\fR member will be set as usual.
80 .SH ATTRIBUTES
81 .sp
82 .LP
83 See \fBattributes\fR(5) for descriptions of the following attributes:
84 .sp
86 .sp
87 .TS
88 box;
89 c | c
90 l | l .
91 ATTRIBUTE TYPE  ATTRIBUTE VALUE
93 Interface Stability     Stable
95 MT-Level        MT-Safe
96 .TE
98 .SH SEE ALSO
99 .sp
101 \fBar.h\fR(3HEAD), \fBelf\fR(3ELF), \fBelf_begin\fR(3ELF),
102 \fBelf_getarsym\fR(3ELF), \fBlibelf\fR(3LIB), \fBattributes\fR(5)