Debian Codegraph @

man/sd-dlopen.xml

raw
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="sd-dlopen" xmlns:xi="http://www.w3.org/2001/XInclude">
7
8 <refentryinfo>
9 <title>sd-dlopen</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>sd-dlopen</refentrytitle>
15 <manvolnum>3</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>sd-dlopen</refname>
20 <refpurpose>ELF dlopen metadata annotation macros</refpurpose>
21 </refnamediv>
22
23 <refsynopsisdiv>
24 <funcsynopsis>
25 <funcsynopsisinfo>#include &lt;systemd/sd-dlopen.h&gt;</funcsynopsisinfo>
26 </funcsynopsis>
27
28 <cmdsynopsis>
29 <command>pkg-config --cflags libsystemd</command>
30 </cmdsynopsis>
31
32 </refsynopsisdiv>
33
34 <refsect1>
35 <title>Description</title>
36
37 <para><filename>sd-dlopen.h</filename> provides macros for embedding
38 <filename>.note.dlopen</filename> metadata in ELF binaries, implementing the
39 <ulink url="https://uapi-group.org/specifications/specs/elf_dlopen_metadata/">ELF dlopen
40 metadata</ulink> specification for declaring optional shared library dependencies that are loaded via
41 <citerefentry project='man-pages'><refentrytitle>dlopen</refentrytitle><manvolnum>3</manvolnum></citerefentry>
42 at runtime.</para>
43
44 <para>The header is self-contained and does not require runtime linkage against
45 <citerefentry><refentrytitle>libsystemd</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
46 Projects only need the installed header to use the macros.</para>
47
48 <para>Package managers and build systems can read the embedded ELF notes to discover runtime
49 dependencies that are not visible in ELF <constant>DT_NEEDED</constant> entries.</para>
50
51 <para>See
52 <citerefentry><refentrytitle>SD_ELF_NOTE_DLOPEN</refentrytitle><manvolnum>3</manvolnum></citerefentry>
53 for details on the available macros and constants.</para>
54 </refsect1>
55
56 <refsect1>
57 <title>Notes</title>
58
59 <para>The macros described here are header-only and do not require runtime linkage against
60 <citerefentry><refentrytitle>libsystemd</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
61 Only the installed header and include path (as provided by
62 <command>pkg-config --cflags libsystemd</command>) are needed.</para>
63 </refsect1>
64
65 <refsect1>
66 <title>History</title>
67 <para><function>SD_ELF_NOTE_DLOPEN()</function> and associated macros and constants were added in
68 version 261.</para>
69 </refsect1>
70
71 <refsect1>
72 <title>See Also</title>
73 <para><simplelist type="inline">
74 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
75 <member><citerefentry><refentrytitle>SD_ELF_NOTE_DLOPEN</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
76 <member><citerefentry project='man-pages'><refentrytitle>dlopen</refentrytitle><manvolnum>3</manvolnum></citerefentry></member>
77 </simplelist></para>
78 </refsect1>
79
80 </refentry>