At Mon, 23 Mar 2020 10:41:14 +0100, Martin Husemann wrote:
Subject: Re: default search path for shared libraries
>
> On Mon, Mar 23, 2020 at 01:41:52AM -0400, Jeffrey Walton wrote:
> >
> > Under LD_LIBRARY_PATH, the man page says:
> >
> > A colon separated list of directories, overriding the
> > default search path for shared libraries.
> >
> > What is the default search path?
>
> That is RPATH from the binary (or RUNPATH, they are the same on newer NetBSD,
> older NetBSD does not support RUNPATH at all).
In other words, what's shown by "readelf -d /bin/path | fgrep PATH", if
anything, else the default path of "/usr/lib" (assuming LD_LIBRARY_PATH
is not set in the environment and /etc/ld.so.conf is empty or missing).
See ld.elf_so(1). (which isn't perfectly clear on search order, unlike
the latest FreeBSD ld.so(1))
--
Greg A. Woods
Kelowna, BC +1 250 762-7675 RoboHack
Planix, Inc. Avoncote Farms
pgpxtbGvoAX7u.pgp
Description: OpenPGP Digital Signature