SD-DLOPEN(3) sd-dlopen SD-DLOPEN(3)

.SH "NAME" sd-dlopen - ELF dlopen metadata annotation macros

.SH "SYNOPSIS"

```
#include <systemd/sd-dlopen.h>
```

.HP 744u

**pkg-config --cflags libsystemd**

.SH "DESCRIPTION"

.PP sd-dlopen.h provides macros for embedding .note.dlopen metadata in ELF binaries, implementing the **ELF dlopen metadata**\[1] specification for declaring optional shared library dependencies that are loaded via [**dlopen**(3)](/man/os/systemd/dlopen.3) at runtime.

.PP The header is self-contained and does not require runtime linkage against [**libsystemd**(3)](/man/os/systemd/libsystemd.3). Projects only need the installed header to use the macros.

.PP Package managers and build systems can read the embedded ELF notes to discover runtime dependencies that are not visible in ELF **DT\_NEEDED** entries.

.PP See [**SD\_ELF\_NOTE\_DLOPEN**(3)](/man/os/systemd/SD_ELF_NOTE_DLOPEN.3) for details on the available macros and constants.

.SH "NOTES"

.PP The macros described here are header-only and do not require runtime linkage against [**libsystemd**(3)](/man/os/systemd/libsystemd.3). Only the installed header and include path (as provided by **pkg-config --cflags libsystemd**) are needed.

.SH "HISTORY"

.PP **SD\_ELF\_NOTE\_DLOPEN()** and associated macros and constants were added in version 261.

.SH "SEE ALSO"

.PP [**systemd**(1)](/man/os/systemd/systemd.1), [**SD\_ELF\_NOTE\_DLOPEN**(3)](/man/os/systemd/SD_ELF_NOTE_DLOPEN.3), [**dlopen**(3)](/man/os/systemd/dlopen.3)

# [NOTES](#NOTES)

1\.

ELF dlopen metadata

https://uapi-group.org/specifications/specs/elf\_dlopen\_metadata/

systemd 262.2

---

Document: sd-dlopen(3) from systemd 262.2-r1 (Chainguard OS)
Source: https://github.com/systemd/systemd
