bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: ld, bad logic of dynamic linker search?


From: Ivan Popov
Subject: Re: ld, bad logic of dynamic linker search?
Date: Thu, 13 Mar 2003 22:22:35 +0100 (MET)

On Thu, 13 Mar 2003, Paul Jarc wrote:

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

Hello Paul,

nice to get an answer so promptly!

Thanks for your suggestion, but if I understand documentation correctly,
it would hardcode the paths into the binary, and that is unfortunately
unacceptable, linktime /somewhere/lib will be something else at runtime.

(thanks God and developers, glibc has the great feature, being
capable of running the ld-linux.so --library-path explicitely.
But even then it does not ignore hardcoded library paths, not easily.)

Even if there are workarounds, I consider the ld's logic in the case above
being a bug.

Best regards,
--
Ivan
btw. I am very grateful for ld and binutils existing and free. Thanks!





reply via email to

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