Typically, we do not explicitly set dlopen note on test binaries.
If we should set notes, let's do that consistently later.
}
static int intro(void) {
- if (DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
+ if (dlopen_libcrypto(LOG_DEBUG) < 0)
return EXIT_TEST_SKIP;
return EXIT_SUCCESS;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <sys/syslog.h>
-
-#include "sd-dlopen.h"
-
#include "gcrypt-util.h"
#include "log.h" /* IWYU pragma: keep */
#if HAVE_GCRYPT
static void *gcrypt_dl = NULL;
- GCRYPT_NOTE(SD_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED);
-
return dlopen_many_sym_or_warn(
&gcrypt_dl,
"libgcrypt.so.20", log_level,
#pragma once
-#include "sd-dlopen.h"
-
#include "basic-forward.h"
int dlopen_gcrypt(int log_level);
# error "missing libgcrypt_cflags in meson dependency."
#endif
-#define GCRYPT_NOTE(priority) \
- SD_ELF_NOTE_DLOPEN("gcrypt", \
- "Support for journald forward-sealing", \
- priority, \
- "libgcrypt.so.20")
-
-#define DLOPEN_GCRYPT(log_level, priority) \
- ({ \
- GCRYPT_NOTE(priority); \
- dlopen_gcrypt(log_level); \
- })
-
#include <gcrypt.h> /* IWYU pragma: export */
#include "dlfcn-util.h"
} while(false)
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(gcry_md_hd_t, sym_gcry_md_close, NULL);
-#else
-#define DLOPEN_GCRYPT(log_level, priority) dlopen_gcrypt(log_level)
#endif
struct stat st;
int r;
- r = DLOPEN_BPF(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
+ r = dlopen_bpf(LOG_ERR);
if (r < 0)
return log_error_errno(r, "Failed to dlopen libbpf: %m");
#if HAVE_LIBBPF
int r;
- r = DLOPEN_BPF(LOG_ERR, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED);
+ r = dlopen_bpf(LOG_ERR);
if (r < 0)
return r;
}
static int intro(void) {
- if (DLOPEN_GCRYPT(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0 &&
- DLOPEN_LIBCRYPTO(LOG_DEBUG, SD_ELF_NOTE_DLOPEN_PRIORITY_RECOMMENDED) < 0)
+ if (dlopen_gcrypt(LOG_DEBUG) < 0 &&
+ dlopen_libcrypto(LOG_DEBUG) < 0)
return EXIT_TEST_SKIP;
return EXIT_SUCCESS;