`Hiding' libc symbols
Daniel Eischen
eischen at pcnet1.pcnet.com
Mon May 5 15:02:45 PDT 2003
On Tue, 6 May 2003, Andrey A. Chernov wrote:
> On Mon, May 05, 2003 at 22:25:54 +0200, Dag-Erling Smorgrav wrote:
> > "Jacques A. Vidrine" <nectar at FreeBSD.org> writes:
> > > So, I advocate hiding all symbols in libc by default. The Real World
> > > doesn't seem to care whether the symbols are defined by any standard or
> > > not.
> >
> > I'm with you, but I would also like to point out that there is a small
> > number of ports which will require changes: ports like electricfence,
> > boehm-gc and others that rely at least in part on replacing libc's
> > malloc(), calloc(), realloc() and free().
>
> Unless my point was not clear from my previous posts, I advocate exact
> opposite: to unhide all standard symbols from libc, including here
> standard prefixes like str*. We must not encourage programmer error
> when he define standard function, it easily leads to unexpected results.
> Better reject such error automatically at the linkage stage. Programmers
> are always free to redefine their functions in case of conflict.
Can't you still do what you want even with the standard symbols
hidden?
--
Dan Eischen
More information about the freebsd-arch
mailing list