From owner-freebsd-arch@FreeBSD.ORG Tue May 6 09:23:52 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 AF64537B401 for ; Tue, 6 May 2003 09:23:52 -0700 (PDT) Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2A7743FAF for ; Tue, 6 May 2003 09:23:51 -0700 (PDT) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.nectar.cc (Postfix) with ESMTP id 3BC8544; Tue, 6 May 2003 11:23:51 -0500 (CDT) Received: by madman.celabo.org (Postfix, from userid 1001) id AA6BD78C66; Tue, 6 May 2003 11:23:52 -0500 (CDT) Date: Tue, 6 May 2003 11:23:52 -0500 From: "Jacques A. Vidrine" To: Harti Brandt Message-ID: <20030506162352.GC78486@madman.celabo.org> Mail-Followup-To: "Jacques A. Vidrine" , Harti Brandt , Terry Lambert , freebsd-arch@FreeBSD.org References: <20030501182820.GA53641@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030506093754.B838@beagle.fokus.fraunhofer.de> <3EB7CC73.9C61C27E@mindspring.com> <20030506165850.Y601@beagle.fokus.fraunhofer.de> <20030506152605.GE77708@madman.celabo.org> <20030506175017.C631@beagle.fokus.fraunhofer.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030506175017.C631@beagle.fokus.fraunhofer.de> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.3i-ja.1 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:23:53 -0000 On Tue, May 06, 2003 at 05:53:16PM +0200, Harti Brandt wrote: > JAV>Or stated more agressively, the day the FreeBSD toolchain refuses > JAV>to allow me to define my own version of strlcpy _for use by my > JAV>application_ is the day I find another development platform. > > So if you 'hide' all the libc symbols you will to exactly that. Of course not. I can define strlcpy like so void strlcpy(struct string *a, struct string *b) { if (a->size == 0) { b->size = 0; return; } /* really copy the string */ } if I want to, and my application will then behave exactly as my insane mind expects. (this is just a sillier example of the real world problem that was encountered) However, since strlcpy is _not_ protected/hidden today, my application as a whole will likely not behave as I expect. I'll innocently call something like getaddrinfo() and *BOOM*. :-) Cheers, -- Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se