`Hiding' libc symbols

Dag-Erling Smorgrav des at ofug.org
Tue May 6 11:40:38 PDT 2003


"Andrey A. Chernov" <ache at 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 at ofug.org


More information about the freebsd-arch mailing list