man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: July 2014
 
 

elf32_checksum(3ELF)

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 TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe

See also

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