]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: add note identifier for dlopen metadata
authorLuca Boccassi <bluca@debian.org>
Wed, 15 May 2024 00:10:35 +0000 (01:10 +0100)
committerArjun Shankar <arjun@redhat.com>
Thu, 30 May 2024 10:24:23 +0000 (12:24 +0200)
This new note type is defined at https://systemd.io/ELF_DLOPEN_METADATA/
and is used to list shared library dependencies loaded via dlopen().
Distro packagers can use this, via tools like those available at
https://github.com/systemd/package-notes to automatically generate
dependencies when building projects that make use of this
specification.

By defining the note id here we can use it in other projects as a
stable identifier, for example in 'readelf' to pretty-print its
content.

Signed-off-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: Arjun Shankar <arjun@redhat.com>
elf/elf.h

index d6ec0120c04dcbae0489cbad595d0184da1e96d2..081742a9c38ca6cb9c34fef4cdc695d42456a0d7 100644 (file)
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1340,6 +1340,10 @@ typedef struct
    https://systemd.io/ELF_PACKAGE_METADATA/ */
 #define NT_FDO_PACKAGING_METADATA 0xcafe1a7e
 
+/* dlopen metadata as defined on
+   https://systemd.io/ELF_DLOPEN_METADATA/ */
+#define NT_FDO_DLOPEN_METADATA 0x407c0c0a
+
 /* Note section name of program property.   */
 #define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property"