tree-wide: add dlopen ELF notes to all dlopen() deps of ours
Use 'recommended' priority for the default compression library, to indicate that it should be prioritized over the other ones, as it will be used to compress journals/core files. Also use 'recommended' for kmod, as systems will likely fail to boot if it's missing from the initrd. Use 'suggested' for everything else. There is one dlopen'ed TPM library that has the name generated at runtime (depending on the driver), so that cannot be added, as it needs to be known at build time. Also when we support multiple ABI versions list them all, as for the same reason we cannot know which one will be used at build time. $ dlopen-notes.py build/libsystemd.so.0.39.0 build/src/shared/libsystemd-shared-256.so libarchive.so.13 suggested libbpf.so.0 suggested libbpf.so.1 suggested libcryptsetup.so.12 suggested libdw.so.1 suggested libelf.so.1 suggested libfido2.so.1 suggested libgcrypt.so.20 suggested libidn2.so.0 suggested libip4tc.so.2 suggested libkmod.so.2 recommended liblz4.so.1 suggested liblzma.so.5 suggested libp11-kit.so.0 suggested libpcre2-8.so.0 suggested libpwquality.so.1 suggested libqrencode.so.3 suggested libqrencode.so.4 suggested libtss2-esys.so.0 suggested libtss2-mu.so.0 suggested libtss2-rc.so.0 suggested libzstd.so.1 recommended Co-authored-by: Luca Boccassi <bluca@debian.org>
This commit is contained in:
committed by
Luca Boccassi
co-authored by
Luca Boccassi
parent
2f6bd11c1a
commit
cd7c207795
@@ -129,6 +129,11 @@ bool compression_supported(Compression c) {
|
||||
|
||||
#if HAVE_XZ
|
||||
int dlopen_lzma(void) {
|
||||
ELF_NOTE_DLOPEN("lzma",
|
||||
"Support lzma compression in journal and coredump files",
|
||||
COMPRESSION_PRIORITY_XZ,
|
||||
"liblzma.so.5");
|
||||
|
||||
return dlopen_many_sym_or_warn(
|
||||
&lzma_dl,
|
||||
"liblzma.so.5", LOG_DEBUG,
|
||||
@@ -186,6 +191,11 @@ int compress_blob_xz(const void *src, uint64_t src_size,
|
||||
|
||||
#if HAVE_LZ4
|
||||
int dlopen_lz4(void) {
|
||||
ELF_NOTE_DLOPEN("lz4",
|
||||
"Support lz4 compression in journal and coredump files",
|
||||
COMPRESSION_PRIORITY_LZ4,
|
||||
"liblz4.so.1");
|
||||
|
||||
return dlopen_many_sym_or_warn(
|
||||
&lz4_dl,
|
||||
"liblz4.so.1", LOG_DEBUG,
|
||||
@@ -242,6 +252,11 @@ int compress_blob_lz4(const void *src, uint64_t src_size,
|
||||
|
||||
#if HAVE_ZSTD
|
||||
int dlopen_zstd(void) {
|
||||
ELF_NOTE_DLOPEN("zstd",
|
||||
"Support zstd compression in journal and coredump files",
|
||||
COMPRESSION_PRIORITY_ZSTD,
|
||||
"libzstd.so.1");
|
||||
|
||||
return dlopen_many_sym_or_warn(
|
||||
&zstd_dl,
|
||||
"libzstd.so.1", LOG_DEBUG,
|
||||
|
||||
@@ -41,6 +41,11 @@ DLSYM_FUNCTION(gcry_randomize);
|
||||
DLSYM_FUNCTION(gcry_strerror);
|
||||
|
||||
static int dlopen_gcrypt(void) {
|
||||
ELF_NOTE_DLOPEN("gcrypt",
|
||||
"Support for journald forward-sealing",
|
||||
ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
|
||||
"libgcrypt.so.20");
|
||||
|
||||
return dlopen_many_sym_or_warn(
|
||||
&gcrypt_dl,
|
||||
"libgcrypt.so.20", LOG_DEBUG,
|
||||
|
||||
Reference in New Issue
Block a user