From owner-freebsd-arch@FreeBSD.ORG Tue May 6 08:38:08 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 E1E3B37B401; Tue, 6 May 2003 08:38:08 -0700 (PDT) Received: from mailhub.fokus.fraunhofer.de (mailhub.fokus.fraunhofer.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F29943F75; Tue, 6 May 2003 08:38:07 -0700 (PDT) (envelope-from brandt@fokus.fraunhofer.de) Received: from beagle (beagle [193.175.132.100])h46Fc6E24185; Tue, 6 May 2003 17:38:06 +0200 (MEST) Date: Tue, 6 May 2003 17:38:06 +0200 (CEST) From: Harti Brandt To: "Jacques A. Vidrine" In-Reply-To: <20030506152926.GG77708@madman.celabo.org> Message-ID: <20030506173249.V631@beagle.fokus.fraunhofer.de> References: <20030501182820.GA53641@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030506093754.B838@beagle.fokus.fraunhofer.de> <20030506152926.GG77708@madman.celabo.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-arch@FreeBSD.org Subject: Re: 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 15:38:09 -0000 On Tue, 6 May 2003, Jacques A. Vidrine wrote: JAV>On Tue, May 06, 2003 at 09:46:12AM +0200, Harti Brandt wrote: JAV>> No. If I define my own printf() I want that printf to be called even by JAV>> library internal calls. JAV> JAV>No, you really don't. If you do, then you use the techniques that JAV>dozens of applications already use today. `Hiding' libc symbols do JAV>not get in the way of these techniques. While you certainly can replace printf(), this will fail if you happen to also replace fopen(). Even if you only replace fopen(). If there are several functions that depend on each other by calling or by using the same data you must replace them all. JAV>printf is an incredibly bad example, of course. What makes you think JAV>there are any calls to printf in libc anyway? try find /usr/src/lib/libc -name \*.c | xargs grep printf There are a lot of calls in debugging code, but there are many left from regular code (error messages for example). harti -- harti brandt, http://www.fokus.fraunhofer.de/research/cc/cats/employees/hartmut.brandt/private brandt@fokus.fraunhofer.de, harti@freebsd.org