Subject: Re: reducing library searches in ld.elf_so
To: Bang Jun-Young <junyoung@mogua.com>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-userlevel
Date: 09/23/2002 07:06:51
On Mon, Sep 23, 2002 at 03:51:32PM +0900, Bang Jun-Young wrote:

 > In fact, I wondered that a little, too.

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

However, some people apparently Really Wanted to have the search path
functionality in ld.elf_so (because they were apparently incapable of
building their binaries with the correct options to set the rpath), and
so it went in.  Some of us (including me) would like to see the ld.so.conf
search path functionality ripped out completely (keeping the LD_LIBRARY_PATH
functionality -- it's cheap and easy to skip that by caching the getenv()
result and checking for NULL).

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>