Hamish Moffatt <[EMAIL PROTECTED]> writes: > On Mon, Feb 11, 2002 at 07:01:09PM +0100, Kjetil Torgrim Homme wrote: > > Aha, I didn't realize there was that kind of black magic in ld.so > > (documented in ldconfig). Well, then I'd venture that ld.so is > > imperfect. If it knows to ignore certain paths in ld.so.conf, it > > When does it ignore paths in ld.so.conf?
ldconfig tags the directories in the cache, so that ld.so knows which paths should be consider for a given program. >From ldconfig(1): ldconfig will attempt to deduce the type of ELF libs (ie. libc 5.x or libc 6.x (glibc)) based on what C libraries if any the library was linked against, [...] Some existing libs do not contain enough information to allow the deduction of their type, therefore the /etc/ld.so.conf file format allows the specification of an expected type. This is only used for those ELF libs which we can not work out. The format is like this "dirname=TYPE", where type can be libc4, libc5 or libc6. > If your binary contains a hard path to /lib/libc.so.6, What do you mean by a hard path? dlopen()? Sure, it won't work. Usually, /lib/ld-linux.so.2 is hard coded, libc is not. > and then we move that library to /usr/i386-glibc2-linux/lib instead > because libc.so.7 is available, your binary will no longer work. If I understand the above excerpt correctly, ldconfig would need to be extended to know about "libc7", but then it'd work. Kjetil T.