/lib/foo.so.X -> /usr/lib/foo.so
Mark Kettenis
kettenis at chello.nl
Thu Sep 4 15:21:14 PDT 2003
Date: Thu, 4 Sep 2003 14:10:50 -0700
From: "David O'Brien" <obrien at FreeBSD.org>
On Thu, Sep 04, 2003 at 11:27:15PM +0300, Ruslan Ermilov wrote:
> On Thu, Sep 04, 2003 at 09:58:39PM +0300, Ruslan Ermilov wrote:
> [...]
> > The patch is not a problem (attached). I've been looking at
> > how our friends do this. NetBSD has symlinks in /usr/lib to
> > /lib, both to .so and .so.X, and their cc(1) and ld(1) don't
> > look things in /lib. Linux looks things up in both /lib and
> > /usr/lib, and does not have symlinks from /usr/lib to /lib.
> >
> There is a sad typo above: Linux *does* have symlinks from
> /usr/lib to /lib, so both use /usr/lib for linking.
What version of Linux are you using? SuSE Enterprise Linux 8, and Red
Hat Enterprise Linux 3 both do not have symlinks for libs from /usr/lib
to /lib. They use a different machanism:
suse# cat /usr/lib/libc.so
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a )
Speaking as a (former) glibc developer (a true convert nowadays):
Well, libc is a special case since there are a few functions that
aren't provided by the shared libc, but are always linked statically.
Linux does this to be compatible with the System V ABI.
The whole thing is actually pointless since most interfaces in libc.so
aren't compatible with the System V ABI, so it's nothing but a
historical fart nowadays.
Anyway, I think you'll see a symlink for /usr/lib/libm.so. At least
my SuSE Linux 8.2 does have it.
Mark
More information about the freebsd-current
mailing list