what is the meaning of /lib/tls directory?
Hi everyone.
I was playing around with a self made bootable cd image, with binaries taken from Fedora Core 1. The problem i had was about shared libraries not beeing found by many programs.
To be more specific ldd says:
ldd /sbin/init
libc.so.6 => /lib/tls/libc.so.6 (0x0063e000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00626000)
If i copy libc.so.6 from /lib/tls directory to my cd tree /lib/tls i get a message like unable to load shared library libc.so.6, file not found (something like that).
By looking on the contents of the glibc package i see
rpm -ql glibc|grep libc
/lib/i686/libc-2.3.2.so
/lib/i686/libc.so.6
/lib/libc-2.3.2.so
/lib/libc.so.6
/lib/libcrypt-2.3.2.so
/lib/libcrypt.so.1
/lib/tls/libc-2.3.2.so
/lib/tls/libc.so.6
/usr/sbin/glibc_post_upgrade
/usr/share/doc/glibc-2.3.2
/usr/share/doc/glibc-2.3.2/BUGS
/usr/share/doc/glibc-2.3.2/CONFORMANCE
/usr/share/doc/glibc-2.3.2/COPYING
/usr/share/doc/glibc-2.3.2/COPYING.LIB
/usr/share/doc/glibc-2.3.2/FAQ
/usr/share/doc/glibc-2.3.2/INSTALL
/usr/share/doc/glibc-2.3.2/LICENSES
/usr/share/doc/glibc-2.3.2/NEWS
/usr/share/doc/glibc-2.3.2/NOTES
/usr/share/doc/glibc-2.3.2/PROJECTS
/usr/share/doc/glibc-2.3.2/README
/usr/share/doc/glibc-2.3.2/README.hesiod
/usr/share/doc/glibc-2.3.2/README.libm
So copying /lib/libc.so.6 to cdtree/lib/ solves the problem. I tried softlinks etc but that was the only thing that solved it.
And the same thing happens with all the libraries under the /lib/tls directory.
Can someone please explain why are two different files with the same name and version in the same package? And why ldd points to the one while the program requires the other? Is there any special purpose or function in each file?
|