`Hiding' libc symbols
Jacques A. Vidrine
nectar at FreeBSD.org
Tue May 6 08:51:28 PDT 2003
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.
Cheers,
--
Jacques Vidrine . NTT/Verio SME . FreeBSD UNIX . Heimdal
nectar at celabo.org . jvidrine at verio.net . nectar at freebsd.org . nectar at kth.se
More information about the freebsd-arch
mailing list