From owner-freebsd-threads@FreeBSD.ORG Mon Mar 15 09:28:28 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF43616A4CE for ; Mon, 15 Mar 2004 09:28:28 -0800 (PST) Received: from newman.gte.com (newman.gte.com [132.197.8.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F7E643D3F for ; Mon, 15 Mar 2004 09:28:28 -0800 (PST) (envelope-from ak03@gte.com) Received: from h132-197-179-27.gte.com (kanpc.gte.com [132.197.179.27]) by newman.gte.com (8.9.1/8.9.1) with ESMTP id MAA15826; Mon, 15 Mar 2004 12:28:28 -0500 (EST) Received: from kanpc.gte.com (localhost [IPv6:::1])i2FHSRPt067948; Mon, 15 Mar 2004 12:28:27 -0500 (EST) (envelope-from ak03@gte.com) Date: Mon, 15 Mar 2004 12:28:27 -0500 From: Alexander Kabaev To: Alexander Kabaev Message-Id: <20040315122827.45c26656@kanpc.gte.com> In-Reply-To: <20040315120153.25a4dd00@kanpc.gte.com> References: <025801c40aa8$d7b76380$1900a8c0@nautilus> <20040315120153.25a4dd00@kanpc.gte.com> Organization: Verizon Data Services X-Mailer: Sylpheed version 0.9.10claws2 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: threads and libstdc++ on FreeBSD 5.2.1-RELEASE X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2004 17:28:29 -0000 On Mon, 15 Mar 2004 12:01:53 -0500 Alexander Kabaev wrote: > On Mon, 15 Mar 2004 18:16:16 +0200 > "Alex Kotov" wrote: > > > Let me guess: you're using 5.2.1-CURRENT or link the application > > against kse and not the lc_r? > > > > I will try kse today but problem is easy to reproduce: just copy & > > paste the source into the test.cc and build it as specified on top > > of it. When you will try to start the binary you will get > > "Segmentation fault (core dumped)". > > > > SY, > > Alex Kotov > > > > I can reproduce this. Appears to be a bug in ld, which fails to pull > in uthread_create.o from libc_c.a archive when linking the program. > > -- > Alexander Kabaev Follow-up: it appears ld is doing exacty as expected. Weak symbol references are not supposed to cause archive member extraction accroding to Sun docs. One can force it with -x weakextract on Solaris, but unfortunately the version of ld in our binutils does not understand this keyword. This happens because libstdc++ marks pthread_create as weak in gthr-default.h header. -- Alexander Kabaev