[Top][All Lists]

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

Re: ld, bad logic of dynamic linker search? (fwd)

From: Ivan Popov
Subject: Re: ld, bad logic of dynamic linker search? (fwd)
Date: Fri, 14 Mar 2003 00:52:58 +0100 (MET)

On Thu, 13 Mar 2003, Paul Jarc wrote:

> ld has no problem finding the dynamic linker.  But there is also a

ld finds the wrong one (/lib/ld-linux.so.2)
while I need it to find it under /somewhere/
as either ld-N.N.N.so or ld-linux.so.2

I am "ready to" supply any flags and variables as long as it does not
cause side effects not related to finding the right linker.

> reference to ld-linux.so.2 (in libc.so.6, I think, or perhaps in

Yes, it is certainly libc.so.6, being linked, it contains this name.

> ld-linux.so.2 itself)

It cannot be ld-linux.so.2 itself as the right one was never opened.
The wrong one has been looked up by ld, and lookup happens definitely
before it is opened :)

> which causes ld-linux.so.2 to be looked for in
> the run-time library search path.  This is glibc's doing, not ld's.

Glibs needs the object and knows its name "ld-linux.so.2". It is perfectly

Too bad, ld looks at wrong place for finding it.

The wrong thing is that it looks it up not in the link library
search path (as I would expect), nor uses -dynamic-linker value,
but looks for the "missing library tio link" in its own runtime (!)
library path.

It can work when the library being linked and the ld runtime one are
compatible, but it is fundamentally wrong.

> If you show us the commands you are running and the error messages you
> get, maybe we can help.

I have made a workaround that works for me (there are several possible and
no one is nice), but I'd like to see ld exhibiting a reasonable behaviour.

With other words, I am trying to convince you (?) to fix the mistake
certainly going to cause problems for other users,
possibly with subtle and hard to diagnose effects.

It is not about my setup problem, I am just investing my time right now,
like you do, in making the world a bit better... (or a byte better...)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]