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 ELF32_GETSHDR 3ELF "Jul 11, 2001"
8 elf32_getshdr, elf64_getshdr \- retrieve class-dependent section header
12 cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ]
15 \fBElf32_Shdr *\fR\fBelf32_getshdr\fR(\fBElf_Scn *\fR\fIscn\fR);
20 \fBElf64_Shdr *\fR\fBelf64_getshdr\fR(\fBElf_Scn *\fR\fIscn\fR);
26 For a 32-bit class file, \fBelf32_getshdr()\fR returns a pointer to a section
27 header for the section descriptor \fIscn\fR. Otherwise, the file is not a
28 32-bit class file, \fIscn\fR was \fINULL,\fR or an error occurred;
29 \fBelf32_getshdr()\fR then returns \fINULL\fR.
32 The \fBelf32_getshdr\fR header includes the following members:
36 \fBElf32_Word sh_name;
44 Elf32_Word sh_addralign;
45 Elf32_Word sh_entsize;\fR
51 while the \fBelf64_getshdr\fR header includes the following members:
55 \fBElf64_Word sh_name;
63 Elf64_Xword sh_addralign;
64 Elf64_Xword sh_entsize;\fR
70 For the 64\(mibit class, replace 32 with 64 as appropriate.
73 If the program is building a new file, it is responsible for creating the
74 file's \fBELF\fR header before creating sections.
78 See \fBattributes\fR(5) for descriptions of the following attributes:
86 ATTRIBUTE TYPE ATTRIBUTE VALUE
88 Interface Stability Stable
96 \fBelf\fR(3ELF), \fBelf_flagdata\fR(3ELF), \fBelf_getscn\fR(3ELF),
97 \fBelf_strptr\fR(3ELF), \fBlibelf\fR(3LIB), \fBattributes\fR(5)