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_KIND 3ELF "Jul 11, 2001"
8 elf_kind \- determine file type
12 cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ]
15 \fBElf_Kind\fR \fBelf_kind\fR(\fBElf *\fR\fIelf\fR);
21 This function returns a value identifying the kind of file associated with an
22 \fBELF\fR descriptor (\fIelf\fR). Defined values are below:
29 The file is an archive [see \fBar.h\fR(3HEAD)]. An \fBELF\fR descriptor may
30 also be associated with an archive \fImember\fR, not the archive itself, and
31 then \fBelf_kind()\fR identifies the member's type.
37 \fB\fBELF_K_COFF\fR\fR
40 The file is a \fBCOFF\fR object file. \fBelf_begin\fR(3ELF) describes the
41 library's handling for \fBCOFF\fR files.
50 The file is an \fBELF\fR file. The program may use \fBelf_getident()\fR to
51 determine the class. Other functions, such as \fBelf32_getehdr()\fR, are
52 available to retrieve other file information.
58 \fB\fBELF_K_NONE\fR\fR
61 This indicates a kind of file unknown to the library.
66 Other values are reserved, to be assigned as needed to new kinds of files.
67 \fIelf\fR should be a value previously returned by \fBelf_begin()\fR. A null
68 pointer is allowed, to simplify error handling, and causes \fBelf_kind()\fR to
69 return \fBELF_K_NONE\fR.
73 See \fBattributes\fR(5) for descriptions of the following attributes:
81 ATTRIBUTE TYPE ATTRIBUTE VALUE
83 Interface Stability Stable
91 \fBar.h\fR(3HEAD), \fBelf\fR(3ELF), \fBelf32_getehdr\fR(3ELF),
92 \fBelf_begin\fR(3ELF), \fBelf_getident\fR(3ELF), \fBlibelf\fR(3LIB),