From owner-freebsd-arch@FreeBSD.ORG Mon May 5 13:50:55 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 3F5A137B401; Mon, 5 May 2003 13:50:55 -0700 (PDT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AA8643F93; Mon, 5 May 2003 13:50:53 -0700 (PDT) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.9/8.12.9) with ESMTP id h45KopMr040724; Tue, 6 May 2003 00:50:51 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.9/8.12.9/Submit) id h45KopbY040723; Tue, 6 May 2003 00:50:51 +0400 (MSD) Date: Tue, 6 May 2003 00:50:51 +0400 From: "Andrey A. Chernov" To: Dag-Erling Smorgrav Message-ID: <20030505205051.GA40572@nagual.pp.ru> References: <20030501182820.GA53641@madman.celabo.org> <20030501191027.GA53801@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030505175426.GA19352@madman.celabo.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i cc: freebsd-arch@freebsd.org 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 20:50:55 -0000 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.