svn commit: branches/uClibc-nptl: ldso/include ldso/ldso libc/misc/pthread etc...

Joakim Tjernlund joakim.tjernlund at transmode.se
Sun Jan 15 10:54:43 UTC 2006


 > 
> I have converted almost all weak_alias to strong_alias. 
> My idea is to mark with weak_alias only those that really are 
> needed to be overwritten by any other (stronger) from another 
> lib. Could you please provide the list of functions that nptl 
> needs weak within libc?
> 
> Jocke: will this be handled correctly by ldso, or it will 
> load the first found version (e.g the one in libc, despite the weak) ?
> 
> Thanks, Peter

ldso will use the one it finds first, weak or strong does not matter.

>From a relocation order view there is no difference between weaks and strong symbols.
Weak symbols makes it possible/easier to have several identical syms without LD complaining
about multiple syms.

This relative new behavior(as of .27 I belive) is the reason vapier had to rewrite the
mutex code in libc.
One can also use weak to test if a sym is defined or not at runtime:
extern weak fun();
if (fun)
   fun();




More information about the uClibc mailing list