elf_hash3
Compute a hash value for a string
Usage
#include <libelf.h>
unsigned long
elf_hash(const char *name);
Library
library “libelf”
Overview
Function elf_hash() computes a portable hash value for the null terminated string pointed to by argument name.
The hash value returned is will be identical across machines of different architectures. This allows hash tables to be built on one machine and correctly used on another of a different architecture. The hash value returned is also guaranteed not to be the bit pattern of all ones (~0UL).
Implementation notes
The library internally uses unsigned 32 bit arithmetic to compute the hash value.
Releases
44 releases since FreeBSD 7.0-RELEASE; the text changed 20 times.