Date: Fri, 5 Sep 2003 00:21:08 +0200 (CEST) From: Mark Kettenis <kettenis@chello.nl> To: obrien@FreeBSD.org Cc: peter@FreeBSD.org Subject: Re: /lib/foo.so.X -> /usr/lib/foo.so Message-ID: <200309042221.h84ML8FD034366@elgar.kettenis.dyndns.org> In-Reply-To: <20030904211050.GA3035@dragon.nuxi.com> (obrien@FreeBSD.org) References: <200309040429.h844TBhD058678@repoman.freebsd.org> <20030904092755.GD45051@sunbay.com> <20030904155659.GC97732@sunbay.com> <20030904174100.GY695@roark.gnf.org> <20030904211050.GA3035@dragon.nuxi.com>
index | next in thread | previous in thread | raw e-mail
Date: Thu, 4 Sep 2003 14:10:50 -0700
From: "David O'Brien" <obrien@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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309042221.h84ML8FD034366>
