]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Optimize dlopen ELF notes via anchoring and explicitly embed them into executables...
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 10 Jul 2026 08:37:39 +0000 (17:37 +0900)
committerGitHub <noreply@github.com>
Fri, 10 Jul 2026 08:37:39 +0000 (17:37 +0900)
This PR optimizes the handling of `dlopen` ELF notes and reduces binary
footprints across the tree.

By enabling compiler section-splitting
(`-ffunction-sections`/`-fdata-sections`), the linker can now accurately
garbage-collect unused code and data. To align with this,
`SD_ELF_NOTE_DLOPEN_ANCHORED()` macro is introduced, which ties `dlopen`
notes to their calling functions so that unused notes are automatically
removed by `--gc-sections`.

Additionally, this explicitly embeds required `dlopen` notes into
individual executables to fix a visibility issue where package managers
missed runtime dependencies invoked indirectly through
`libsystemd-shared.so`.

1  2 
src/nspawn/nspawn-oci.c

Simple merge