__libc_xxx functions: what are they?

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Dec 9 09:01:30 UTC 2008


On Tue, Dec 09, 2008 at 08:37:50AM +0100, Carmelo Amoroso wrote:
>Denys Vlasenko wrote:
>> Hi,
>> 
>> We have the following aliases witj __libc prefix:
>> 
>> # grep -rh $'[ \t]__libc_[a-z_0-9]*;$' . | sort | uniq | grep __typeof

>> I do not see any explanation what are these?
>> 
>> I do see that some of them are used from libpthread, but
>> many are not (__libc_accept, __libc_getdomainname...).
>> 
>> One purpose I might imagine if to make sure you are using
>> libc implementation of a function, not something from
>> another library...
>> 
>IIRC, this is one of the reason.
>
>> Anyone knows better?
>
>probably these were intended to be used with
>libc_hidden_proto/defs for avoing PLT entries
>when called from within libc itself... but now
>it should be the case any more.

All __libc_*() should be removed or, where needed, at least hidden.

We need some few functions for "intimite" users such as libpthread (and
perhaps librt). For these we will (resp NPTL probably already has or
should have) add a dispatcher struct (think GLRO et al).



More information about the uClibc mailing list