From owner-freebsd-arch@FreeBSD.ORG Mon May 5 07:21:28 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 4EE6F37B401; Mon, 5 May 2003 07:21:28 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC9E643F93; Mon, 5 May 2003 07:21:27 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0250.cvx22-bradley.dialup.earthlink.net ([209.179.198.250] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19CgqI-0005AE-00; Mon, 05 May 2003 07:21:23 -0700 Message-ID: <3EB67318.17C3A06C@mindspring.com> Date: Mon, 05 May 2003 07:20:08 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Harti Brandt References: <20030501182820.GA53641@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4fb8c1b037403cfd6f2b438097e994dfe93caf27dac41a8fd350badd9bab72f9c350badd9bab72f9c 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 14:21:28 -0000 Harti Brandt wrote: > On Thu, 1 May 2003, Jacques A. Vidrine wrote: > JAV> (c) Hide all symbols, except those that are likely to > JAV> be candidates to be overridden. malloc/free seem > JAV> to be the only ones here. > > As far as I know, all programs from J.Schilling (cdrecord, star, ...) > carry their own printf (and a good other half of libc). I suppose there > are others that do this. While overriding libc functions is not exactly > standard supported (as far as I understand), it has been used ever since. > If there are un-overridable functions (for whatever reasons) they should > be documented somewhere (say in the man page of that function). We should > not expect application writers/porters to dig around in libc internals. Most commercial applications vendors I have ever worked for have carried around their own libraries of functions that were potentially implemented differently on different platforms, and "printf" has always been at the top of this list, along with the entire curses library, the entire termcap library, and all termcap entries used by that library. It just makes good portability sense to carry around anything you suspect of being platform dependent, and minimizing your system-dependent API "footprint" for your application, as much as possible. -- Terry