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 .LP
  25 The \fBelf32_checksum()\fR function returns a simple checksum of selected
  26 sections of the image identified by \fIelf\fR. The value is typically used as
  27 the \fB\&.dynamic\fR tag \fBDT_CHECKSUM\fR, recorded in dynamic executables and
  28 shared objects.
  29 .sp
  30 .LP
  31 Selected sections of the image are used to calculate the checksum in order that
  32 its value is not affected by utilities such as \fBstrip\fR(1).
  33 .sp
  34 .LP
  35 For the 64\(mibit class, replace 32 with 64 as appropriate.
  36 .SH ATTRIBUTES
  37 .LP
  38 See \fBattributes\fR(5) for descriptions of the following attributes:
  39 .sp
  40 
  41 .sp
  42 .TS
  43 box;
  44 c | c
  45 l | l .
  46 ATTRIBUTE TYPE  ATTRIBUTE VALUE
  47 _
  48 Interface Stability     Stable
  49 _
  50 MT-Level        MT-Safe
  51 .TE
  52 
  53 .SH SEE ALSO
  54 .LP
  55 \fBelf\fR(3ELF), \fBelf_version\fR(3ELF), \fBgelf\fR(3ELF), \fBlibelf\fR(3LIB),
  56 \fBattributes\fR(5)