Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jun 2002 00:16:38 +0100
From:      Tony Finch <dot@dotat.at>
To:        Peter Wemm <peter@wemm.org>
Cc:        Martin Faxer <gmh003532@brfmasthugget.se>, David Greenman-Lawrence <dg@root.com>, Alfred Perlstein <alfred@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern uipc_syscalls.c
Message-ID:  <20020625001638.B30678@chiark.greenend.org.uk>
In-Reply-To: <20020624192716.108D9380E@overcee.wemm.org>; from peter@wemm.org on Mon, Jun 24, 2002 at 12:27:16PM -0700
References:  <20020624180724.GB2134@lockdown.spectrum.fearmuffs.net> <20020624192716.108D9380E@overcee.wemm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 24, 2002 at 12:27:16PM -0700, Peter Wemm wrote:
> 
> Of course, if you are prepared to add  #define sendfile nsendfile  in an
> include file, then that works.

NetBSD does the moral equivalent of this in order to maintain binary
compatibility, but it does nasty things to dlsym().

There are a few LD_PRELOAD syscall wrappers out there which rely on
simple code like foo() { foo_magic(); dlfunc(NULL, "foo")(); }.
However, in NetBSD some syscalls have been given new ABIs
with a new name using tricks to make them look like like the
old name at source level.  (Observe the __RENAME() macros in
http://cvsweb.netbsd.org/bsdweb.cgi/syssrc/sys/sys/stat.h?rev=1.41).
The problem is that wrappers end up implementing the new ABI (because
they are subject to source renaming) in terms of the old one (because
dlsym isn't) which is itself implemented in terms of the new one,
causing a loop.

Tony.
-- 
f.a.n.finch <dot@dotat.at> http://dotat.at/
VIKING NORTH UTSIRE SOUTH UTSIRE FORTIES CROMARTY FORTH: SOUTHWESTERLY 4 IN
EAST VIKING AND NORTH UTSIRE AT FIRST, OTHERWISE WESTERLY 5 OR 6. RAIN OR
SHOWERS. MODERATE OR GOOD.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020625001638.B30678>