Date: Fri, 08 Feb 2002 11:18:48 +0200 From: Maxim Sobolev <sobomax@FreeBSD.org> To: "M. Warner Losh" <imp@village.org> 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 Message-ID: <3C6397F8.CC02F78C@FreeBSD.org> References: <1013147180.73417.2.camel@notebook> <20020207.234721.71750312.imp@village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
"M. Warner Losh" wrote: > > In message: <1013147180.73417.2.camel@notebook> > Maxim Sobolev <sobomax@FreeBSD.ORG> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C6397F8.CC02F78C>