How are weaks elided from single-threaded processes?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How are weaks elided from single-threaded processes?

Peter Mazinger
Hello!

In libc-lock.h I found this comment:
/* Make the pthread functions weak so that we can elide them from
single-threaded processes.  */

Could someone please explain how this works?

Does it apply only to the static libs, or does it make sense for the
shared ones as well?

If these weaks are "automagically" elided from shared libs as well, then I
am wondering if the check in forward.c FORWARD2 macro is not superfluos.

Thanks, Peter

P.S. Please CC, not on list.

--
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2