[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ld, bad logic of dynamic linker search?
From: |
Paul Jarc |
Subject: |
Re: ld, bad logic of dynamic linker search? |
Date: |
Thu, 13 Mar 2003 16:03:16 -0500 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux) |
Ivan Popov <address@hidden> wrote:
> but the linker, to resolve remaining references, still is searching for :
>
> 1st surprise: "ld-linux.so.2" (why not "/somewhere/ld-2.3.2.so"?)
I'd guess this might be because the dynamic linker's own path is
embedded in itself:
# ldd glibc/lib/libc-2.3.2.so
/package/misc/spf/glibc-2.3.2/lib/ld-linux.so.2 =>
/package/misc/spf/glibc-2.3.2/lib/ld-linux.so.2 (0x40000000)
> 2nd surprise: searches for it in its LD_LIBRARY_PATH and "standard
> places", hence finds 2.2.5 stuff only, of course
> (and fails to link)
If you invoke ld by way of gcc, you can set LIBRARY_PATH=/somewhere in
the environment. gcc will then pass the appropriate flags to ld to
tell it to look there for libraries, startup files, etc.
paul