From owner-freebsd-current Wed Oct 30 15:53:11 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B3C3637B401 for ; Wed, 30 Oct 2002 15:53:09 -0800 (PST) Received: from flamingo.mail.pas.earthlink.net (flamingo.mail.pas.earthlink.net [207.217.120.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A3BD43E4A for ; Wed, 30 Oct 2002 15:53:09 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0465.cvx40-bradley.dialup.earthlink.net ([216.244.43.210] helo=mindspring.com) by flamingo.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 1872e1-0001Gk-00; Wed, 30 Oct 2002 15:53:05 -0800 Message-ID: <3DC07094.F67F5C66@mindspring.com> Date: Wed, 30 Oct 2002 15:51:48 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Doug Rabson Cc: Daniel Eischen , current@freebsd.org Subject: Re: [PATCH: libc]Re: gnome on current References: <20021030234026.M22480-100000@herring.nlsystems.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message