From owner-cvs-all Mon Jun 24 16:16:49 2002 Delivered-To: cvs-all@freebsd.org Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [212.135.138.206]) by hub.freebsd.org (Postfix) with ESMTP id 7AA6737B400; Mon, 24 Jun 2002 16:16:42 -0700 (PDT) Received: from fanf by chiark.greenend.org.uk with local (Exim 3.12 #1) id 17Md4Y-0000U3-00 (Debian); Tue, 25 Jun 2002 00:16:38 +0100 Date: Tue, 25 Jun 2002 00:16:38 +0100 From: Tony Finch To: Peter Wemm Cc: Martin Faxer , David Greenman-Lawrence , Alfred Perlstein , 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> References: <20020624180724.GB2134@lockdown.spectrum.fearmuffs.net> <20020624192716.108D9380E@overcee.wemm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020624192716.108D9380E@overcee.wemm.org>; from peter@wemm.org on Mon, Jun 24, 2002 at 12:27:16PM -0700 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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