Skip to content
Commit 785969a0 authored by Florian Weimer's avatar Florian Weimer
Browse files

elf: Implement a string table for ldconfig, with tail merging



This will be used in ldconfig to reduce the ld.so.cache size slightly.

Tail merging is an optimization where a pointer points into another
string if the first string is a suffix of the second string.

The hash function FNV-1a was chosen because it is simple and achieves
good dispersion even for short strings (so that the hash table bucket
count can be a power of two).  It is clearly superior to the hsearch
hash and the ELF hash in this regard.

The hash table uses chaining for collision resolution.

Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent dfb3f101
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment