atom feed17 messages in org.freebsd.freebsd-currentRe: World breakage in libc_r?
FromSent OnAttachments
John PolstraOct 13, 1999 2:36 pm 
Doug RabsonOct 14, 1999 1:08 am 
Marcel MoolenaarOct 14, 1999 3:16 am 
Wilko BulteOct 14, 1999 9:45 am 
Kenneth Wayne CulverOct 14, 1999 12:09 pm 
Daniel EischenOct 14, 1999 12:20 pm 
John PolstraOct 14, 1999 2:06 pm 
John BirrellOct 14, 1999 2:19 pm 
Daniel EischenOct 14, 1999 2:34 pm 
John PolstraOct 14, 1999 2:44 pm 
John BirrellOct 14, 1999 2:53 pm 
Daniel EischenOct 14, 1999 3:25 pm 
David O'BrienOct 15, 1999 8:38 am 
Wilko BulteOct 15, 1999 11:09 am 
John BirrellOct 15, 1999 3:07 pm 
pa...@phoenix.volant.orgOct 15, 1999 3:23 pm 
John PolstraOct 17, 1999 10:16 am 
Subject:Re: World breakage in libc_r?
From:Wilko Bulte (wil@yedi.iaf.nl)
Date:Oct 15, 1999 11:09:35 am
List:org.freebsd.freebsd-current

As Daniel Eischen wrote ...

Sheer curiosity and most likely a somewhat dim question:

what the h* is a weak versus a strong symbol?

Thanks, Wilko

John Birrell wrote:

Weak symbols don't work too well _between_ libraries. If libc is linked before libpthread, any unresolved references when libc is searched will use the weak symbols from there, regardless of the fact that a strong symbol exists in libpthread. If libc is linked after libpthread, then you can have libc internal references to things that should been resolved to things in libpthread, but end up using the weak symbols in libc because that is all there is left. 8-(

Not a simple problem to solve. The current tools don't help at all. A second library pass to resolve weak symbols would have been better. It's too late for that now, though, since you can change the semantics on the shared loader.

It'd be interesting to know how Solaris does this. I see they don't supply a static libpthread, just the dynamic. It seems they do use a strong symbol in libpthread, and a weak one in libc:

vfr [80] $ nm /usr/lib/libc.so.1 | grep pthread_mutex_lock [4394] | 596188| 44|FUNC |WEAK |0 |12 |_pthread_mutex_lock [2980] | 596188| 44|FUNC |WEAK |0 |12 |pthread_mutex_lock vfr [81] $ nm /usr/lib/libpthread.so.1 | grep pthread_mutex_lock [333] | 20704| 8|FUNC |GLOB |0 |8 |_pthread_mutex_lock [107] | 20704| 8|FUNC |WEAK |0 |8 |pthread_mutex_lock

To Unsubscribe: send mail to majo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message