From owner-freebsd-arch@FreeBSD.ORG Mon May 5 16:11:37 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 274A037B401 for ; Mon, 5 May 2003 16:11:37 -0700 (PDT) Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4667743FCB for ; Mon, 5 May 2003 16:11:36 -0700 (PDT) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.nectar.cc (Postfix) with ESMTP id A29804; Mon, 5 May 2003 18:11:35 -0500 (CDT) Received: by madman.celabo.org (Postfix, from userid 1001) id 8801578C66; Mon, 5 May 2003 18:11:35 -0500 (CDT) Date: Mon, 5 May 2003 18:11:35 -0500 From: "Jacques A. Vidrine" To: "Andrey A. Chernov" Message-ID: <20030505231135.GA21953@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , "Andrey A. Chernov" , Dag-Erling Smorgrav , freebsd-arch@freebsd.org References: <20030501182820.GA53641@madman.celabo.org> <20030501191027.GA53801@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030505175426.GA19352@madman.celabo.org> <20030505205051.GA40572@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030505205051.GA40572@nagual.pp.ru> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.3i-ja.1 cc: freebsd-arch@freebsd.org cc: Dag-Erling Smorgrav Subject: Re: `Hiding' libc symbols X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2003 23:11:37 -0000 On Tue, May 06, 2003 at 12:50:51AM +0400, Andrey A. Chernov wrote: > On Mon, May 05, 2003 at 22:25:54 +0200, Dag-Erling Smorgrav wrote: > > "Jacques A. Vidrine" writes: > > > So, I advocate hiding all symbols in libc by default. The Real World > > > doesn't seem to care whether the symbols are defined by any standard or > > > not. > > > > I'm with you, but I would also like to point out that there is a small > > number of ports which will require changes: ports like electricfence, > > boehm-gc and others that rely at least in part on replacing libc's > > malloc(), calloc(), realloc() and free(). > > Unless my point was not clear from my previous posts, I advocate exact > opposite: to unhide all standard symbols from libc, including here > standard prefixes like str*. We must not encourage programmer error > when he define standard function, it easily leads to unexpected results. > Better reject such error automatically at the linkage stage. Programmers > are always free to redefine their functions in case of conflict. And what will you do with the hundreds (perhaps thousands) of applications that (IMHO most legitimately, some not) define symbols that are technically in some standard's space, such as `snprintf', `strlcpy', `accept', `close', ... ? ``Fix'' them all? Throw them away? What about applications that are already compiled? I think such fascism would result in us behaving in a very un-UNIX fashion. Cheers, -- Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se