elf_hash(3) - NetBSD Manual Pages

ELF_HASH(3)             NetBSD Library Functions Manual            ELF_HASH(3)


NAME
elf_hash -- compute a hash value for a string
LIBRARY
ELF Object Manipulation Library (libelf, -lelf)
SYNOPSIS
#include <libelf.h> unsigned long elf_hash(const char *name);
DESCRIPTION
Function elf_hash() computes a portable hash value for the null termi- nated 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.
SEE ALSO
elf(3), gelf(3) NetBSD 7.0 August 15, 2006 NetBSD 7.0

Powered by man-cgi (2026-04-06). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.