Bug 2589 - ld vs. ld.so
Summary: ld vs. ld.so
Status: REOPENED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-20 12:22 UTC by j^
Modified: 2008-03-20 22:21 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
document the ldsearch change (344 bytes, patch)
2006-05-08 13:01 UTC, Matthias Klose
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description j^ 2006-04-20 12:22:29 UTC
i ran into a problem while working on a shared libaray
and trying to compile some programs without explicit 
linking of the lib dependencies. 
the problem was that while ld.so / ldd would pick up
the lib that was in /usr/local/lib (as configured in /etc/ld.so.conf);
ld would try to link to the on in /usr/lib.

checking in the man pages, indeed ld and ld.so search for libraries
in a diffrent order. imho this is broken and ld should check
 /etc/ld.so.conf before checking in /usr/lib and /lib

man ld.so
lists the order to look for libs as:
 LD_LIBRARY_PATH
 /etc/ld.so.cache
 /usr/lib
 /lib

while 'man ld' lists:
 LD_LIBRARY_PATH
 The default directories, normally /lib and /usr/lib.
 /etc/ld.so.conf
Comment 1 Alan Modra 2006-04-20 13:12:52 UTC
Already fixed mainline and 2.17 branch.
Comment 2 Matthias Klose 2006-05-08 13:01:51 UTC
Created attachment 1007 [details]
document the ldsearch change

The change in the search path is mentioned in the NEWS file, but not in the
docs.
Comment 3 Matthias Klose 2006-05-08 13:02:30 UTC
The change in the search path is mentioned in the NEWS file, but not in the
docs.