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

Bug#655711: ldconfig makes system loader /lib/ld-linux.so.2 to be linked to 3rd party loader in /lib directory

Thanks Jonathan for your quick reply.
Yes, I am doing some test/check with different ubuntu versions and this
issue observed or encountered only on Ubuntu 11.04. Also not been seeing
this on earlier versions and recent Ubuntu 11.10.

Yes, you are right that the SONAME of our loader ld-<name>.so.2 loader is
pointing to  system loader ld-linux.so.2.
The output of "readelf" is below:

root@ubuntuserver1104:~# readelf -d /lib/ld-<name>.so.2 | grep SONAME
 0x0000000e (SONAME)                     Library soname: [ld-linux.so.2]

Its curious to know that, why this is only happening on Ubuntu 11.04? Any
specific dependent with ldconfig? and not observed on other ubuntu
versions even though the soname encoded is same as ld-linux.so.2.

Appreciate if you could point to some link gives info on how to change the
SONAME of a shared library.

Thanks and Regards,
Venkatesh Prasad C
On 14/01/12 1:32 AM, "Jonathan Nieder" <jrnieder@gmail.com> wrote:

>Venkatesh_Prasad@McAfee.com wrote:
>> Version: 2.13-0ubuntu13
>Can you reproduce this with libc-bin from Debian squeeze or sid?  If
>not, this is not the place to report it.  Ubuntu bugs are tracked on
>> System having installed with some 3rd party loaders (ld-<name>.so.x)
>> in /lib directory. With these loaders present if we run ldconfig,
>> its removing the system loader symbolic link ld-linux.so.2 in /lib
>> directory from /lib/i286-linux-gnu/ld-2.13.so and creating the
>> symbolic link to one of the 3rd party loaders(in my case link to
>> ld-nails.so.2) present in /lib directory.
>Is this a regression?  Did previous versions ignore ld-nails.so.2 for
>some reason?
>It looks like what is happening is that ld-nails.so.2 encodes a SONAME
>of ld-linux.so.2 (you can check with "readelf -d /lib/ld-nails.so.2 |
>grep SONAME"), so ldconfig makes a symlink to it.  The dynamic loader
>is considered a shared library just like /lib/lib* and has been so at
>least since ldconfig was added to glibc in 1999.
>If one wants a private library, so as not to have ldconfig
>automatically creating symlinks to it, it cannot go straight in /lib
>or anywhere else on the library path but should be placed elsewhere
>(for example somewhere in /opt).  Alternatively, if this is a public
>library but is not meant to provide the ld-linux.so.2 interface, it
>should encode a different soname.
>Hope that helps,

Reply to: