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:
Create shared library loader
ld-test.so.2providing SONAME of system loader that is
ld-linux.so.2and copy loader
After completing ldconfig system is in unusable state that means no commands work, workaround for commands to work is to set
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'.
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?