From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 26 00:21:21 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 0FB491065676; Thu, 26 Feb 2009 00:21:21 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id B85B18FC1C; Thu, 26 Feb 2009 00:21:20 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n1Q02l9R024884; Wed, 25 Feb 2009 19:02:47 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Wed, 25 Feb 2009 19:02:47 -0500 (EST) Date: Wed, 25 Feb 2009 19:02:47 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: d@delphij.net In-Reply-To: <49A5D67C.8080102@delphij.net> Message-ID: References: <49A5D67C.8080102@delphij.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: kan@freebsd.org, freebsd-hackers Subject: Re: How to change an interface? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Feb 2009 00:21:47 -0000 On Wed, 25 Feb 2009, Xin LI wrote: > -----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? Yes, I believe that is correct. I also think that the awk script that processes the Symbol.map files will also warn you if the symbol is multiply declared. -- DE