From owner-freebsd-current Fri Nov 8 3:49:32 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E7F137B401 for ; Fri, 8 Nov 2002 03:49:31 -0800 (PST) Received: from conure.mail.pas.earthlink.net (conure.mail.pas.earthlink.net [207.217.120.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0725443E75 for ; Fri, 8 Nov 2002 03:49:31 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from dialup-209.247.142.245.dial1.sanjose1.level3.net ([209.247.142.245] helo=mindspring.com) by conure.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18A7dH-0007VG-00; Fri, 08 Nov 2002 03:49:04 -0800 Message-ID: <3DCBA463.E7B4EB52@mindspring.com> Date: Fri, 08 Nov 2002 03:47:47 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Doug Rabson Cc: kientzle@acm.org, current@FreeBSD.ORG Subject: Re: [PATCH] note the __sF change in src/UPDATING References: <3DCADE51.2090607@acm.org> <200211080929.17687.dfr@nlsystems.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Doug Rabson wrote: > > It _would_ be a good idea to document any internal library > > symbols used by macros. Removing such symbols is a > > good way to break existing compiled applications. > > > > Library design involves a lot of tradeoffs. > > In the windows world, all this is handled by having a strict list of explicit > symbol exports, either in the source code using syntax extensions or with a > file supplied to the linker. I'm not sure whether binutils supports this kind > of thing but it would allow us to cut down the set of symbols exported from > libc.so. Linux does it, so binutils supports it. Linux does this for kernel modules, and for libraries. On Linux, glibc2 (or whatever it's called this morning) does not export any symbols that it uses internally. In the general case, it's better to eat some small amount of overhead, than to export a data interface. Note that data interfaces get in the way of the LGPL "relink" clause for shared libraries. For example, if you had a GPL'ed program that was written in Modula 3 or FORTRAN 95, that had a reference to the __sF, then distribution of that program would demand distribution of the intermediate library source code, where normally it would not be required, due to the "relink clause" not being satisfied, since an attempt to link against the 5.0 libc would fail. Data interfaces are a pain in the ass legally, as well as making your code not work. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message