Paul Eggert wrote: > The optional-libsystemd script could be generalized to do something > similar for other dynamic libraries that have this issue. (As an aside, > it is annoying that objcopy makes this sort of thing such a pain but > perhaps objcopy could be improved to make it easier.) > > Although the script puts a bit of the burden on the packagers, the > feature's burden must go *somewhere*, and since packagers want the > feature they are more likely to maintain it well.
If I understand it correctly, this script adds a '.note.dlopen' section, in the format documented in https://uapi-group.org/specifications/specs/elf_dlopen_metadata/ and already implemented in https://github.com/systemd/package-notes Such a section is useful, at least for security researchers who want to understand the total attack surface of an ELF binary, and for generating a package dependency of type "Recommends". AFAICS, Luca's preferred way to generate this section is via the SD_ELF_NOTE_DLOPEN macro defined in <systemd/sd-dlopen.h>. The macro looks reasonable. But why is it in a systemd header?? We would like to be able to declare - the dependency of some coreutils programs to openssl, - the dependency of 'sort' to libcrypto, and all this has nothing to do with systemd. It is a valid technique also in Devuan, FreeBSD, Solaris, and other systems. I would view it as a general utility header. Should we include a (standalone) copy of it in Gnulib? Bruno
