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: Paul Jarc
Subject: Re: ld, bad logic of dynamic linker search?
Date: Thu, 13 Mar 2003 16:50:16 -0500
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 (gnu/linux)

Ivan Popov <address@hidden> wrote:
> On Thu, 13 Mar 2003, Paul Jarc wrote:
>> 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.
>
> 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.

No, LD_RUN_PATH would be embedded for run-time use, but LIBRARY_PATH
is used only at compile time.

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

You mean you want ld to automatically search for libraries, etc., in
the same directory as the dynamic linker?  Where would you place that
directory in the search order, relative to -L directories, the
defaults, etc.?


paul




reply via email to

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