From owner-freebsd-hackers Fri Feb 8 1:19:34 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from alcatraz.iptelecom.net.ua (alcatraz.iptelecom.net.ua [212.9.224.15]) by hub.freebsd.org (Postfix) with ESMTP id BE6DE37B41D; Fri, 8 Feb 2002 01:19:26 -0800 (PST) Received: from ipcard.iptcom.net (ipcard.iptcom.net [212.9.224.5]) by alcatraz.iptelecom.net.ua (8.9.3/8.9.3) with ESMTP id LAA67366; Fri, 8 Feb 2002 11:19:05 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Received: from vega.vega.com (h8.234.dialup.iptcom.net [212.9.234.8]) by ipcard.iptcom.net (8.9.3/8.9.3) with ESMTP id LAA51227; Fri, 8 Feb 2002 11:19:02 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Received: from FreeBSD.org (big_brother.vega.com [192.168.1.1]) by vega.vega.com (8.11.6/8.11.3) with ESMTP id g189IVd67826; Fri, 8 Feb 2002 11:18:31 +0200 (EET) (envelope-from sobomax@FreeBSD.org) Message-ID: <3C6397F8.CC02F78C@FreeBSD.org> Date: Fri, 08 Feb 2002 11:18:48 +0200 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en,uk,ru MIME-Version: 1.0 To: "M. Warner Losh" Cc: jdp@FreeBSD.org, deischen@FreeBSD.org, jasone@FreeBSD.org, hackers@FreeBSD.org, jlemon@FreeBSD.org Subject: Re: Linking libc before libc_r into application causes weirdproblems References: <1013147180.73417.2.camel@notebook> <20020207.234721.71750312.imp@village.org> Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "M. Warner Losh" wrote: > > In message: <1013147180.73417.2.camel@notebook> > Maxim Sobolev writes: > : Based on the problematic code in the ORBit I had prepared short testcase > : illustrating the problem and attaching it with this message. The problem > : could be exposed by compiling the test.c using the following command: > : > : $ cc test.c -o test -lc -lc_r > > cc test.c -o test -pthread > > If that doesn't work, test.c is broken :-) Hmm, as far as I understand in current -pthread is being slowly deorbited (replaced with just -lc_r), but this could lead to a problem when some of other libraries the binary being linked with contains explicit dependency to libc. I think that ld(1) should be smart enough to reorder libc/libc_r so that libc_r is always linked before libc. -Maxim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message