Date: Thu, 6 Aug 1998 23:50:01 -0700 (PDT) From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/7189 Message-ID: <199808070650.XAA18574@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/7189; it has been noted by GNATS. From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: bin/7189 Date: Fri, 07 Aug 1998 08:40:00 +0200 ------- Forwarded Message Date: Tue, 07 Jul 1998 11:03:40 -0700 From: John Polstra <jdp@polstra.com> X-UIDL: 7fabdb7b5906a9bcab5aa93c2d28b044 > not a good idea, right ? ... > >> Synopsis: ld doesn't look for libxxx.so > >> > >> State-Changed-From-To: open-closed > >> State-Changed-By: phk > >> State-Changed-When: Tue Jul 7 02:40:22 PDT 1998 > >> State-Changed-Why: > >> How would you tell which version of library you expect then ? > >> This clearly seem like a bad idea to me It depends on whether it's a.out or elf. For a.out, I agree with you. The linker should only accept a library with version numbers, just as ours does now. For elf, the conventions are different. The static linker always looks for "libxxx.so". The dynamic linker looks for "libxxx.so.3", which is a symbolic link to "libxxx.so". The last piece of the puzzle is that "libxxx.so" contains information which indicates that the library is version 3, and that information is copied into any executable that's linked with the library. That's how the dynamic linker knows which version to look for. The idea behind it is to avoid searching directories and to avoid the need for anything like ldconfig. That's also really why there aren't any minor version numbers in elf. If you know the major version number, then you know exactly what filename to look for. It's kind of lame and simple-minded, but it's the established convention. If you want to pacify the person, you can tell him that he'll get what he wants when we switch to elf. John ------- End of Forwarded Message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808070650.XAA18574>
