On Sun, 30 Nov 2025 at 21:20, Bruno Haible <[email protected]> wrote:

> 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.
>

Great, that makes things simpler for me right now! I shall thus endeavour
to follow your suggestion and come up with a fixed version of the patch.

-- 
Web: rrt.sc3d.org

Reply via email to