Subject: Re: reducing library searches in ld.elf_so
To: Charles Hannum <abuse@spamalicious.com>
From: Bang Jun-Young <junyoung@mogua.com>
List: current-users
Date: 09/24/2002 00:09:26
On Mon, Sep 23, 2002 at 02:32:43PM +0000, Charles Hannum wrote:
>
> > Really, the search path stuff shouldn't even be there. ELF has rpath to
> > encode the path to the library so that you don't have to do an expensive
> > path search (a.out didn't have rpath, and thus had the expensive path search).
>
> What, pray tell, are you talking about?
>
> There are 3 paths searched:
>
> * LD_LIBRARY_PATH and the executable's rpath
> * the module's rpath
> * the default path (/usr/lib,/lib)
>
> All of these are part of ELF.
>
> The rpath does not give you a path for each library/module; it gives
> you a global search path for all of them.
Additional default directories specified in /etc/ld.so.conf belong
to none of above.
If you set one in ld.so.conf like
/usr/foo
then ld.elf_so tries to find shared objects in /usr/foo first. IMO, this
is unnecessary for ELF ld.elf_so and should have been removed, but it
still does. Setting LD_LIBRARY_PATH in environment file would be
enough for the same purpose.
Jun-Young
--
Bang Jun-Young <junyoung@mogua.com>