From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 25 23:38:50 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B59A106566C; Wed, 25 Feb 2009 23:38:50 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (delphij-pt.tunnel.tserv2.fmt.ipv6.he.net [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id A99328FC1C; Wed, 25 Feb 2009 23:38:49 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [211.166.10.233]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id 9D88628448; Thu, 26 Feb 2009 07:38:48 +0800 (CST) Received: from localhost (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id AFEBCEDC96A; Thu, 26 Feb 2009 07:38:47 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by localhost (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with ESMTP id XjZQQG6tWaNR; Thu, 26 Feb 2009 07:38:42 +0800 (CST) Received: from charlie.delphij.net (adsl-76-237-33-62.dsl.pltn13.sbcglobal.net [76.237.33.62]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id 3FDD1EB5D7A; Thu, 26 Feb 2009 07:38:40 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:subject:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=B2L7ixstYmnFgHsdcYytcQepp9w8uG0Ke/uZ25GuCNq5Fa00V7n7FvigwxGpYTJd5 Wyu/C7HNVr4LVLDsluBOA== Message-ID: <49A5D67C.8080102@delphij.net> Date: Wed, 25 Feb 2009 15:38:36 -0800 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.19 (X11/20090217) MIME-Version: 1.0 To: freebsd-hackers , kan@FreeBSD.org X-Enigmail-Version: 0.95.7 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: How to change an interface? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2009 23:38:50 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Just wanted to confirm that the following procedure to change an existing interface: - Remove the symbol in question from all previous FBSD_1.* namespaces with their corresponding Symbol.map files; - Add the new symbol into latest FBSD_1.* namespace, say, FBSD_1.1 for now, into corresponding Symbol.map files; - Create a new file containing the compatibility shims with prefix __ and suffix of something indicating its obsoleteness, e.g. _44bsd. For instance, for function foo(), the shim function would be called __foo_44bsd(); - At the tail of the shim file, add glues for the old symbols like this: __sym_compat(foo, __foo_44bsd, FBSD_1.0); - Double check to make sure that new .so would work with old binaries. Is that correct? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.10 (FreeBSD) iEYEARECAAYFAkml1nwACgkQi+vbBBjt66CgLwCgojrOaeSyuNHdHQyzxA0+UEMq PREAn0rFE8zpFez0WbccVAir8Nhf/AK0 =MBeo -----END PGP SIGNATURE-----