xref: /titanic_51/usr/src/man/man3elf/elf32_checksum.3elf (revision ed9aabc708901eb85fb058aacbd851c0fd958a16)
te
Copyright 1989 AT&T Copyright (c) 2001, 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]
elf32_checksum 3ELF "11 Jul 2001" "SunOS 5.11" "ELF Library Functions"
NAME
elf32_checksum, elf64_checksum - return checksum of elf image
SYNOPSIS

cc [ flag ... ] file ... -lelf [ library ... ]
#include <libelf.h>

long elf32_checksum(Elf *elf);

long elf64_checksum(Elf *elf);
DESCRIPTION

The elf32_checksum() function returns a simple checksum of selected sections of the image identified by elf. The value is typically used as the .dynamic tag DT_CHECKSUM, recorded in dynamic executables and shared objects.

Selected sections of the image are used to calcluate the checksum in order that its value is not affected by utilities such as strip(1).

For the 64-bit class, replace 32 with 64 as appropriate.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityStable
MT-LevelMT-Safe
SEE ALSO

elf(3ELF), elf_version(3ELF), gelf(3ELF), libelf(3LIB), attributes(5)