elf: Implement tail merging of strings in ldconfig
authorFlorian Weimer <fweimer@redhat.com>
Fri, 4 Dec 2020 08:13:43 +0000 (09:13 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 4 Dec 2020 08:16:41 +0000 (09:16 +0100)
commit73b6e50a22dea9ae6144beaaa675d2ac62c281ca
treebdc65b11a605da08ab1b424f197ff0e0feab5eee
parent785969a047ad2f23f758901c6816422573544453
elf: Implement tail merging of strings in ldconfig

This simplifies the string table construction in elf/cache.c
because there is no more need to keep track of offsets explicitly;
the string table implementation does this internally.

This change slightly reduces the size of the cache on disk.  The
file format does not change as a result.  The strings are
null-terminated, without explicit length, so tail merging is
transparent to readers.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
elf/Makefile
elf/cache.c