Reuben Thomas wrote:
> I see a problem here: we want to use _GL_USE_DLADDR on non-Linux,
> non-Windows systems that have dladdr in libdl, i.e. where otherwise there's
> no other way to make the code work.

No: as I said in [1], for these systems (Hurd, Android, Haiku, HP-UX)
you may want to look for an implementation that does not use dladdr().
But in the absence of such an implementation, it's better to not use
dladdr(), because that will avoid an additional link dependency.
If it means that there are situations where relocability does not work,
so be it. These 4 systems have not many users.

> So I think I need a more complex test than "is LIBDL empty?", I need to
> test "are we on a Linux system using glibc of the right version or uClibc?".

No. The question "are we on a Linux system using glibc of the right version
or uClibc?" is only relevant for whether to use the /proc-reading code,
that gets activated only if we can't use dladdr() from libc.

Bruno

[1] https://lists.gnu.org/archive/html/bug-gnulib/2025-11/msg00278.html




Reply via email to