ksh: build with __EXTENSIONS__ to expose confstr
[unleashed.git] / share / man / man3elf / elf_getbase.3elf
blob121ac5b9f67d08792f98dc07d0d8d621da7e011c
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_GETBASE 3ELF "Jul 11, 2001"
7 .SH NAME
8 elf_getbase \- get the base offset for an object file
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ]
13 #include <libelf.h>
15 \fBoff_t\fR \fBelf_getbase\fR(\fBElf *\fR\fIelf\fR);
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 The \fBelf_getbase()\fR function returns the file offset of the first byte of
22 the file or archive member associated with \fIelf\fR, if it is known or
23 obtainable, and \fB\(mi1\fR otherwise. A null \fIelf\fR is allowed, to simplify
24 error handling; the return value in this case is \fB\(mi1\fR\&. The base offset
25 of an archive member is the beginning of the member's information, \fInot\fR
26 the beginning of the archive member header.
27 .SH ATTRIBUTES
28 .sp
29 .LP
30 See \fBattributes\fR(5) for descriptions of the following attributes:
31 .sp
33 .sp
34 .TS
35 box;
36 c | c
37 l | l .
38 ATTRIBUTE TYPE  ATTRIBUTE VALUE
40 Interface Stability     Stable
42 MT-Level        MT-Safe
43 .TE
45 .SH SEE ALSO
46 .sp
47 .LP
48 \fBar.h\fR(3HEAD), \fBelf\fR(3ELF), \fBelf_begin\fR(3ELF), \fBlibelf\fR(3LIB),
49 \fBattributes\fR(5)