tree-wide: drop DLOPEN_FOO() macros

Since 4c0d8d9673, most dlopen notes are
set at the beginning of the executables. Let's manage all dlopen notes
there, rather than setting them where dlopen is called.

Note that the only exceptions are the LIBBPF_NOTE for networkd and
nsresource. Since dlopen_bpf() is wrapped in an `#if` guard, the notes
are instead set within the corresponding functionality.

As a result, the DLOPEN_FOO() wrapper macros are no longer needed and
can be dropped completely.
This commit is contained in:
Yu Watanabe
2026-07-18 04:56:32 +09:00
parent e056e2a707
commit 661ab8b6fd
94 changed files with 223 additions and 233 deletions
+3 -3
View File
@@ -1575,7 +1575,7 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) {
fputc('~', f);
#if HAVE_SECCOMP
if (DLOPEN_LIBSECCOMP(LOG_DEBUG, recommended) >= 0) {
if (dlopen_libseccomp(LOG_DEBUG) >= 0) {
void *id, *val;
bool first = true;
HASHMAP_FOREACH_KEY(val, id, c->syscall_filter) {
@@ -1996,7 +1996,7 @@ char** exec_context_get_syscall_filter(const ExecContext *c) {
assert(c);
#if HAVE_SECCOMP
if (DLOPEN_LIBSECCOMP(LOG_DEBUG, recommended) < 0)
if (dlopen_libseccomp(LOG_DEBUG) < 0)
return strv_new(NULL);
void *id, *val;
@@ -2065,7 +2065,7 @@ char** exec_context_get_syscall_log(const ExecContext *c) {
assert(c);
#if HAVE_SECCOMP
if (DLOPEN_LIBSECCOMP(LOG_DEBUG, recommended) < 0)
if (dlopen_libseccomp(LOG_DEBUG) < 0)
return strv_new(NULL);
void *id, *val;