From nobody  Mon Jul  6 13:09:22 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id NAA10173;
          Mon, 6 Jul 1998 13:09:22 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199807062009.NAA10173@hub.freebsd.org>
Date: Mon, 6 Jul 1998 13:09:22 -0700 (PDT)
From: dancy@franz.com
To: freebsd-gnats-submit@freebsd.org
Subject: ld doesn't look for libxxx.so
X-Send-Pr-Version: www-1.0

>Number:         7189
>Category:       bin
>Synopsis:       ld doesn't look for libxxx.so
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul  6 13:10:00 PDT 1998
>Closed-Date:    Tue Jul 7 02:40:22 PDT 1998
>Last-Modified:  Thu Aug  6 23:50:01 PDT 1998
>Originator:     Ahmon Dancy
>Release:        3.0-980222-SNAP
>Organization:
Franz Inc.
>Environment:
FreeBSD pig.franz.com 3.0-980222-SNAP FreeBSD 3.0-980222-SNAP #4: Tue May 12 16:24:24 PDT 1998     root@pig.franz.com:/usr/src/sys/compile/PIG  i386
>Description:
I have a complaint from one of our developers about the way 'ld' looks
for shared libraries.  Currently it looks for libXXX.so.M.n.  We think
it should also accept libXXXX.so (Without version numbers).  
>How-To-Repeat:

>Fix:
Modification of /usr/src/gnu/usr.bin/ld/shlib.c

>Release-Note:
>Audit-Trail:
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 
. 

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
 
>Unformatted:
