diff options
Diffstat (limited to 'usr/src/man/man3elf/elf_kind.3elf')
-rw-r--r-- | usr/src/man/man3elf/elf_kind.3elf | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/usr/src/man/man3elf/elf_kind.3elf b/usr/src/man/man3elf/elf_kind.3elf new file mode 100644 index 0000000000..f3d2f99753 --- /dev/null +++ b/usr/src/man/man3elf/elf_kind.3elf @@ -0,0 +1,102 @@ +'\" te +.\" Copyright 1989 AT&T Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved +.\" 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. +.\" 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. +.\" 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] +.TH elf_kind 3ELF "11 Jul 2001" "SunOS 5.11" "ELF Library Functions" +.SH NAME +elf_kind \- determine file type +.SH SYNOPSIS +.LP +.nf +cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ] +#include <libelf.h> + +\fBElf_Kind\fR \fBelf_kind\fR(\fBElf *\fR\fIelf\fR); +.fi + +.SH DESCRIPTION +.sp +.LP +This function returns a value identifying the kind of file associated with an +\fBELF\fR descriptor (\fIelf\fR). Defined values are below: +.sp +.ne 2 +.mk +.na +\fB\fBELF_K_AR\fR\fR +.ad +.RS 14n +.rt +The file is an archive [see \fBar.h\fR(3HEAD)]. An \fBELF\fR descriptor may +also be associated with an archive \fImember\fR, not the archive itself, and +then \fBelf_kind()\fR identifies the member's type. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBELF_K_COFF\fR\fR +.ad +.RS 14n +.rt +The file is a \fBCOFF\fR object file. \fBelf_begin\fR(3ELF) describes the +library's handling for \fBCOFF\fR files. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBELF_K_ELF\fR\fR +.ad +.RS 14n +.rt +The file is an \fBELF\fR file. The program may use \fBelf_getident()\fR to +determine the class. Other functions, such as \fBelf32_getehdr()\fR, are +available to retrieve other file information. +.RE + +.sp +.ne 2 +.mk +.na +\fB\fBELF_K_NONE\fR\fR +.ad +.RS 14n +.rt +This indicates a kind of file unknown to the library. +.RE + +.sp +.LP +Other values are reserved, to be assigned as needed to new kinds of files. +\fIelf\fR should be a value previously returned by \fBelf_begin()\fR. A null +pointer is allowed, to simplify error handling, and causes \fBelf_kind()\fR to +return \fBELF_K_NONE\fR. +.SH ATTRIBUTES +.sp +.LP +See \fBattributes\fR(5) for descriptions of the following attributes: +.sp + +.sp +.TS +tab() box; +cw(2.75i) |cw(2.75i) +lw(2.75i) |lw(2.75i) +. +ATTRIBUTE TYPEATTRIBUTE VALUE +_ +Interface StabilityStable +_ +MT-LevelMT-Safe +.TE + +.SH SEE ALSO +.sp +.LP +\fBar.h\fR(3HEAD), \fBelf\fR(3ELF), \fBelf32_getehdr\fR(3ELF), +\fBelf_begin\fR(3ELF), \fBelf_getident\fR(3ELF), \fBlibelf\fR(3LIB), +\fBattributes\fR(5) |