NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: default search path for shared libraries



At Mon, 23 Mar 2020 10:41:14 +0100, Martin Husemann <martin%duskware.de@localhost> 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 <gwoods%acm.org@localhost>

Kelowna, BC     +1 250 762-7675           RoboHack <woods%robohack.ca@localhost>
Planix, Inc. <woods%planix.com@localhost>     Avoncote Farms <woods%avoncote.ca@localhost>

Attachment: pgpfYvaKnyVw1.pgp
Description: OpenPGP Digital Signature



Home | Main Index | Thread Index | Old Index