2 .\" Copyright 1989 AT&T Copyright (c) 1996, 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_GETARSYM 3ELF "Jul 11, 2001"
8 elf_getarsym \- retrieve archive symbol table
12 cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ]
15 \fBElf_Arsym *\fR\fBelf_getarsym\fR(\fBElf *\fR\fIelf\fR, \fBsize_t *\fR\fIptr\fR);
21 The \fBelf_getarsym()\fR function returns a pointer to the archive symbol
22 table, if one is available for the \fBELF\fR descriptor \fIelf\fR. Otherwise,
23 the archive doesn't have a symbol table, an error occurred, or \fIelf\fR was
24 null; \fBelf_getarsym()\fR then returns a null value. The symbol table is an
25 array of structures that include the following members.
31 unsigned long as_hash;\fR
37 These members have the following semantics:
44 A pointer to a null-terminated symbol name resides here.
53 This value is a byte offset from the beginning of the archive to the member's
54 header. The archive member residing at the given offset defines the associated
55 symbol. Values in \fBas_off\fR may be passed as arguments to \fBelf_rand()\fR.
56 See \fBelf_begin\fR(3ELF) to access the desired archive member.
65 This is a hash value for the name, as computed by \fBelf_hash()\fR.
70 If \fIptr\fR is non-null, the library stores the number of table entries in the
71 location to which \fIptr\fR points. This value is set to \fB0\fR when the
72 return value is \fINULL\fR. The table's last entry, which is included in the
73 count, has a null \fBas_name\fR, a zero value for \fBas_off\fR, and \fB~0UL\fR
77 The hash value returned is guaranteed not to be the bit pattern of all ones (
82 See \fBattributes\fR(5) for descriptions of the following attributes:
90 ATTRIBUTE TYPE ATTRIBUTE VALUE
92 Interface Stability Stable
100 \fBar.h\fR(3HEAD), \fBelf\fR(3ELF), \fBelf_begin\fR(3ELF),
101 \fBelf_getarhdr\fR(3ELF), \fBelf_hash\fR(3ELF), \fBlibelf\fR(3LIB),