shared: add DLOPEN_* wrapper macros that stamp .note.dlopen on callers
This macro emits an SD_ELF_NOTE_DLOPEN note so that calling sites, and not just libsystemd-shared, get the ELF stamped with the notes documenting the dependency. Currently most of the dlopen notes end up in libsystemd-shared, and executables have no way to document the optional dependencies they need. With this new macro, this issue can be fixed. Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -281,11 +281,7 @@ int dlopen_cryptsetup(int log_level) {
|
||||
* still available though, and given we want to support 2.2.0 for a while longer, we'll use the old
|
||||
* symbol if the new one is not available. */
|
||||
|
||||
SD_ELF_NOTE_DLOPEN(
|
||||
"cryptsetup",
|
||||
"Support for disk encryption, integrity, and authentication",
|
||||
SD_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
|
||||
"libcryptsetup.so.12");
|
||||
CRYPTSETUP_NOTE(SD_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED);
|
||||
|
||||
r = dlopen_many_sym_or_warn(
|
||||
&cryptsetup_dl, "libcryptsetup.so.12", log_level,
|
||||
|
||||
Reference in New Issue
Block a user