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 ELF32_CHECKSUM 3ELF "Jul 11, 2001" 7 .SH NAME 8 elf32_checksum, elf64_checksum \- return checksum of elf image 9 .SH SYNOPSIS 10 .LP 11 .nf 12 cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ] 13 #include <libelf.h> 14 15 \fBlong\fR \fBelf32_checksum\fR(\fBElf *\fR\fIelf\fR); 16 .fi 17 18 .LP 19 .nf 20 \fBlong\fR \fBelf64_checksum\fR(\fBElf *\fR\fIelf\fR); 21 .fi 22 23 .SH DESCRIPTION 24 .sp 25 .LP 26 The \fBelf32_checksum()\fR function returns a simple checksum of selected 27 sections of the image identified by \fIelf\fR. The value is typically used as 28 the \fB\&.dynamic\fR tag \fBDT_CHECKSUM\fR, recorded in dynamic executables and 29 shared objects. 30 .sp 31 .LP 32 Selected sections of the image are used to calcluate the checksum in order that 33 its value is not affected by utilities such as \fBstrip\fR(1). 34 .sp 35 .LP 36 For the 64\(mibit class, replace 32 with 64 as appropriate. 37 .SH ATTRIBUTES 38 .sp 39 .LP 40 See \fBattributes\fR(5) for descriptions of the following attributes: 41 .sp 42 43 .sp 44 .TS 45 box; 46 c | c 47 l | l . 48 ATTRIBUTE TYPE ATTRIBUTE VALUE 49 _ 50 Interface Stability Stable 51 _ 52 MT-Level MT-Safe 53 .TE 54 55 .SH SEE ALSO 56 .sp 57 .LP 58 \fBelf\fR(3ELF), \fBelf_version\fR(3ELF), \fBgelf\fR(3ELF), \fBlibelf\fR(3LIB), 59 \fBattributes\fR(5)