From owner-freebsd-arch@FreeBSD.ORG Mon May 5 15:02:45 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 6B50137B407 for ; Mon, 5 May 2003 15:02:45 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B1A043F3F for ; Mon, 5 May 2003 15:02:44 -0700 (PDT) (envelope-from eischen@pcnet1.pcnet.com) Received: from pcnet1.pcnet.com (localhost [127.0.0.1]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h45M2hBg001796; Mon, 5 May 2003 18:02:43 -0400 (EDT) Received: from localhost (eischen@localhost)h45M2gBm001792; Mon, 5 May 2003 18:02:42 -0400 (EDT) Date: Mon, 5 May 2003 18:02:42 -0400 (EDT) From: Daniel Eischen To: "Andrey A. Chernov" In-Reply-To: <20030505205051.GA40572@nagual.pp.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 22:02:45 -0000 On Tue, 6 May 2003, 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. Can't you still do what you want even with the standard symbols hidden? -- Dan Eischen