Date: Mon, 15 Mar 2004 12:28:27 -0500 From: Alexander Kabaev <ak03@gte.com> To: Alexander Kabaev <ak03@gte.com> Cc: freebsd-threads@freebsd.org Subject: Re: threads and libstdc++ on FreeBSD 5.2.1-RELEASE 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Mar 2004 12:01:53 -0500 Alexander Kabaev <ak03@gte.com> wrote: > On Mon, 15 Mar 2004 18:16:16 +0200 > "Alex Kotov" <al_kotov@yahoo.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040315122827.45c26656>