From owner-freebsd-arch@FreeBSD.ORG Tue May 6 11:40:38 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 A181A37B401; Tue, 6 May 2003 11:40:38 -0700 (PDT) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id B770643FBD; Tue, 6 May 2003 11:40:37 -0700 (PDT) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id 50901530E; Tue, 6 May 2003 20:40:36 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: "Andrey A. Chernov" References: <20030501191027.GA53801@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030505175426.GA19352@madman.celabo.org> <20030505205051.GA40572@nagual.pp.ru> <20030505231135.GA21953@madman.celabo.org> <20030505231837.GA44533@nagual.pp.ru> <20030506170823.GI83663@lucky.net> <20030506182756.GA57720@nagual.pp.ru> From: Dag-Erling Smorgrav Date: Tue, 06 May 2003 20:40:35 +0200 In-Reply-To: <20030506182756.GA57720@nagual.pp.ru> (Andrey A. Chernov's message of "Tue, 6 May 2003 22:27:56 +0400") Message-ID: User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 18:40:38 -0000 "Andrey A. Chernov" writes: > On Tue, May 06, 2003 at 19:56:27 +0200, Dag-Erling Smorgrav wrote: >> - If you stayed awake through the previous paragraph you should by >> now have concluded that it simply is not possible for the linker to >> enforce namespaces like Andrey wants it to, because a) the linker >> can't know what headers were included; b) the exact set of reserved >> names can vary from compilation unit to compilation unit within the >> same application and c) namespace issues affect portions of the >> code which are outside the linker's purview (such as the names of >> function arguments and static or automatic variables). Namespaces >> are a source code issue and cannot be handled anywhere but at the >> source code level. > There is no problem. Each *.h function prototype can be accompanied with > some assembler instruction making it strong reference. The same thing can > be conditionalized at the header level using _POSIX_SOURCE or other > defines. So, linker will know, what headers are included. I would like to draw your attention to points b) and c) above and ask how you plan to address them. DES -- Dag-Erling Smorgrav - des@ofug.org