Files
Arjun Shankar 4535a6a52d dlfcn: Deprecate dlinfo request type RTLD_DI_ORIGIN (bug #24298)
Commit b52619f2e8 added a new dlinfo
request type, RTLD_DI_ORIGIN_PATH, to be used instead of RTLD_DI_ORIGIN
which is prone to buffer overflows.  With a replacement available,
RTLD_DI_ORIGIN can now be deprecated.

This commit deprecates RTLD_DI_ORIGIN by adding a compile-time warning
upon its use, and documents the deprecation in the manual.

The warning depends on "Enumerator Attributes" supported by gcc
since 6.1 and by clang.  A new macro __attribute_deprecated_enum__,
analogous to __attribute_deprecated_msg__, is defined in cdefs.h.
Because gnulib can override system-installed cdefs.h, thus hiding our
definition, the deprecation is conditional on the macro being defined.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2026-07-30 12:48:36 +02:00
..