Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 May 2003 20:40:35 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: `Hiding' libc symbols
Message-ID:  <xzp8ytjgbq4.fsf@flood.ping.uio.no>
In-Reply-To: <20030506182756.GA57720@nagual.pp.ru> (Andrey A. Chernov's message of "Tue, 6 May 2003 22:27:56 %2B0400")
References:  <20030501191027.GA53801@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030505175426.GA19352@madman.celabo.org> <xzpk7d53zu5.fsf@flood.ping.uio.no> <20030505205051.GA40572@nagual.pp.ru> <20030505231135.GA21953@madman.celabo.org> <20030505231837.GA44533@nagual.pp.ru> <xzpy91k3j9n.fsf@flood.ping.uio.no> <20030506170823.GI83663@lucky.net> <xzpllxkez78.fsf@flood.ping.uio.no> <20030506182756.GA57720@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
"Andrey A. Chernov" <ache@nagual.pp.ru> 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



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