Doug Rabson wrote:
> > > For what its worth, doing this (defining strong pthread_* symbols in
> > > libc_r) makes everything work fine, with or without libXThrStub.
> >
> > No, this would be bad.  There's some justification for not
> > doing this, in allowing programs linked againts libraries linked
> > against threaded libraries to link against alternate threads
> > libraries.  If the symbols are stong, then this is not possible.
> 
> Wrong. Either link the app to libc_r or to libpthread or to
> libmyOwnThreads.

NO.

If you have a library that's linked to a library containing string
symbols, then no other library gets a chance to replace to symbols
with its own strong symbols.  The first strong symbol always wins,
and the search is defined to be depth-first.


> > Maybe the workaround for now is to make the symbols in libXThrStub.so
> > weak?
> 
> They *are* weak Terry. The problem is that every bloody definition is weak
> so the linker has no way of picking the one definition which will actually
> work. The real problem is that the actual working threads library doesn't
> provide strong symbols to allow it to override all the other stubs.

First strong/last weak should win.  You are saying "last weak" is not
winning.  That's a linker bug.

-- Terry

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to