Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2003 17:38:06 +0200 (CEST)
From:      Harti Brandt <brandt@fokus.fraunhofer.de>
To:        "Jacques A. Vidrine" <nectar@FreeBSD.org>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: Re: `Hiding' libc symbols
Message-ID:  <20030506173249.V631@beagle.fokus.fraunhofer.de>
In-Reply-To: <20030506152926.GG77708@madman.celabo.org>
References:  <20030501182820.GA53641@madman.celabo.org> <XFMail.20030501144502.jhb@FreeBSD.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030506093754.B838@beagle.fokus.fraunhofer.de> <20030506152926.GG77708@madman.celabo.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030506173249.V631>