, Jason Thorpe <thorpej@nas.nasa.gov>
From: Frank van der Linden <frank@wins.uva.nl>
List: tech-userlevel
Date: 03/12/1999 16:09:52
On Fri, Mar 12, 1999 at 10:01:29AM -0500, Greg Hudson wrote:
> As an aside, Matt wrote:
> > The search order for our ld.elf_so is:
>
> > 1) rpaths in the object(s)
> > 2) default path (defined to be /usr/lib:/usr/local/lib in the source)
> > 3) LD_LIBRARY_PATH
>
That was me, actually..
> So the > actual search order seems to be:
>
> 1) LD_LIBRARY_PATH
> 2) default path
> 3) rpaths in the object(s)
>
[...]
> What's worse is
> that if you're adding a directory to the search path and it already
> exists, _rtld_add_paths() doesn't pull that directory to the front or
> end of the search path; it does nothing.
Whoa, I didn't know that. This order seems wrong to me. If this search
order is kept, then I actually do object against ld.so.conf, because it
might mess things up unexpectedly. I agree that this order should be
changed so that 2) and 3) are switched. Otherwise you'd _always_
be screwed in Jason's example.
- Frank