From owner-freebsd-arch@FreeBSD.ORG Tue May 6 09:12:18 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 7425737B401; Tue, 6 May 2003 09:12:18 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01EB643FD7; Tue, 6 May 2003 09:12:15 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h46GCDE29141; Tue, 6 May 2003 18:12:13 +0200 (MEST) Date: Tue, 6 May 2003 18:12:13 +0200 (CEST) From: Harti Brandt To: "Jacques A. Vidrine" In-Reply-To: <20030506155128.GB77956@madman.celabo.org> Message-ID: <20030506180935.A631@beagle.fokus.fraunhofer.de> References: <20030505225021.GA43345@nagual.pp.ru> <20030506155128.GB77956@madman.celabo.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "Andrey A. Chernov" cc: Dag-Erling Smorgrav cc: Daniel Eischen 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: Tue, 06 May 2003 16:12:18 -0000 On Tue, 6 May 2003, Jacques A. Vidrine wrote: JAV>On Tue, May 06, 2003 at 09:42:04AM -0600, Ben Mesander wrote: JAV>> In addition to ports which override libc functions like printf() for JAV>> ease of porting, there are important ports, such as the Boehm garbage JAV>> collector for C/C++ or electric fence, which _depend_ upon the ability JAV>> to override libc functions such as malloc() and free(). JAV>> JAV>> Whatever decision is eventually made must allow such ports to JAV>> function. JAV>> JAV>> This has been brought up once before, but I do not see how any of the JAV>> advocates for change have addressed it. JAV> JAV>Probably because there is not much to address. I think it is JAV>universally agreed that the allocator is likely to need to be JAV>overridden. There are at least two solutions: JAV> JAV> (a) Treat malloc & company as an exception: always call them by JAV> their un-adorned name from within libc. JAV> JAV> (b) Let these specialized applications override the adorned names JAV> instead. There is probably already code within these ports to JAV> deal with underscore-prefixed names. JAV> JAV>I don't really have a preference for either solution. If you absolutely need to, use b). Treating all functions uniform reduces the number of surprises one will encounter by 1. harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org