---
name: "sd-dlopen"
section: "3"
platform: "linux"
package: "systemd-libs"
version: "262.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/sd-dlopen"
---

# sd-dlopen(3)

ELF dlopen metadata annotation macros

## NAME

sd-dlopen - ELF dlopen metadata annotation macros

## SYNOPSIS

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

**pkg-config --cflags libsystemd**

## DESCRIPTION

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)](/dlopen/3.md) at runtime.

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

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

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

## NOTES

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

## HISTORY

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

## SEE ALSO

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

## NOTES

- 1\.

  ELF dlopen metadata

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