`Hiding' libc symbols

David O'Brien freebsd-arch at FreeBSD.org
Tue May 6 09:46:02 PDT 2003


On Tue, May 06, 2003 at 10:51:28AM -0500, Jacques A. Vidrine wrote:
> On Tue, May 06, 2003 at 09:42:04AM -0600, Ben Mesander wrote:
> > In addition to ports which override libc functions like printf() for
> > ease of porting, there are important ports, such as the Boehm garbage
> > collector for C/C++ or electric fence, which _depend_ upon the ability
> > to override libc functions such as malloc() and free().
> > 
> > Whatever decision is eventually made must allow such ports to
> > function.
> > 
> > This has been brought up once before, but I do not see how any of the
> > advocates for change have addressed it.
> 
> Probably because there is not much to address.  I think it is
> universally agreed that the allocator is likely to need to be
> overridden.  There are at least two solutions:
> 
>   (a) Treat malloc & company as an exception: always call them by
>       their un-adorned name from within libc.
> 
>   (b) Let these specialized applications override the adorned names
>       instead.  There is probably already code within these ports to
>       deal with underscore-prefixed names.
> 
> I don't really have a preference for either solution.

I have a strong preference for (c) Do nothing.
(a)'s over time we'll just add to (a)'s list, so the exceptions are just
too ad-hoc.


More information about the freebsd-arch mailing list