Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Description

ldconfig command unlinks the existing system loader ld-linux.so that is linked to /lib/i386-linux-gnu/ld-2.13.so which also creates symlink to 3rd party loader that resides in /lib/ld-.so, . This behavior can be reproduced by installing any pkg or by upgrading the system using 'apt-get' for example when 3rd party loader ld-.so is present in /lib directory.

Steps to reproduce:

  1. Create shared library loader ld-test.so.2 providing SONAME of system loader that is ld-linux.so.2 and copy loader ld-test.so.2 to /lib directory

  2. Run command ldconfig

  3. After completing ldconfig system is in unusable state that means no commands work, workaround for commands to work is to set

     LD_LIBRARY_PATH="/lib/i386-linux-gnu". 
    

But kernel panic occurs if we reboot system.

We noticed that the ldconfig which creates symbolic link to 3rd party loader when upgrade is invoked VIA apt-get.

It seems that ldconfig searches based on SONAME of each library, also observed our 3rd party library 'SONAME' uses readelf -d /lib/ld-.so.2 utility. As 3rd party loader ld-.so and system loader /li/ld-linux.so.2 have same 'SONAME', we think this could causes the ldconfig to link to 3rd party loader.

Not sure why we created simple shared library which is having same SONAME as the system loader has. We then upgraded system using 'apt-get' and encountered the issue.

However, other versions/Distribution (Ubuntu 10.10. RHEL, SLES) of Linux works fine with this 3rd party loader having same 'SONAME'.

Question

How is it functioning different in Ubuntu 11.04? Is there any specific change with respect to ‘ldconfig’ loading/linking of 3rd party loaders kept in /lib directory?

share|improve this question
I would think that if you are going to replace ld with a third party one, you would also need to replace ldconfig with their version. – psusi Jun 6 '12 at 0:58
We are bundling third party ldconfig and all other files required for ld. – user71962 Jun 20 '12 at 10:04

closed as too localized by Bruno Pereira Apr 12 at 13:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.