tree-wide: embed dlopen notes into individual executables

Previously, when a library was dynamically loaded via a helper function
inside libsystemd-shared.so, the resulting dlopen ELF note was not
propagated to the invoking executable's ELF metadata.

This commit explicitly annotates each executable with the relevant
dlopen ELF notes for any optional dependencies it might potentially
load. This ensures that package managers and build systems can properly
discover runtime dependencies that are triggered indirectly.
This commit is contained in:
Yu Watanabe
2026-07-10 16:35:19 +09:00
parent 3853a40f39
commit 4c0d8d9673
87 changed files with 432 additions and 4 deletions
+6
View File
@@ -6,6 +6,7 @@
#include "argv-util.h"
#include "build.h"
#include "chase.h"
#include "dlopen-note.h"
#include "errno-util.h"
#include "extract-word.h"
#include "fd-util.h"
@@ -376,6 +377,11 @@ static int umount_mstack(void) {
static int run(int argc, char *argv[]) {
int r;
LIBBLKID_NOTE(recommended);
LIBCRYPTO_NOTE(suggested);
LIBCRYPTSETUP_NOTE(suggested);
LIBMOUNT_NOTE(recommended);
log_setup();
if (invoked_as(argv, "mount.mstack"))