From owner-freebsd-hackers Thu Apr 2 17:26:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA19520 for freebsd-hackers-outgoing; Thu, 2 Apr 1998 17:26:50 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from mail.calweb.com (mail.calweb.com [208.131.56.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA19512 for ; Thu, 2 Apr 1998 17:26:44 -0800 (PST) (envelope-from fritcher@calweb.com) Received: by mail.calweb.com (8.8.6/8.8.6) with SMTP id RAA11714; Thu, 2 Apr 1998 17:26:32 -0800 (PST) X-SMTP: helo web2.calweb.com from fritcher@calweb.com server fritcher@web2.calweb.com ip 208.131.56.52 Date: Thu, 2 Apr 1998 17:26:31 -0800 (PST) From: "Jason K. Fritcher" To: John Birrell cc: hackers@FreeBSD.ORG Subject: Re: pthread question In-Reply-To: <199804020543.PAA12640@cimlogic.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 2 Apr 1998, John Birrell wrote: > Jason K. Fritcher wrote: > > Tried it, but it didn't make any difference. If it was the problem, it > > should have given me errors about _pthread_create being unreferenced also. > > It is really puzzling why it is finding the _pthread_create function, but > > not the one above. > > I link a lot of things static, but I always issue separate commands > for compile and link. I gave this a try, using a combo of gcc and ld, it got rid of the _pthread_join error, but now it is giving this error, which I have never seen before, since I normally just let gcc do both the compile and the link. Here is what I did. [jkf@outreach:~/src/thread]$ gcc -g -D_THREAD_SAFE -o blah.o -c blah.c [jkf@outreach:~/src/thread]$ ld -Bstatic /usr/lib/crt0.o blah.o -lc_r blah.c:11: Undefined symbol `___main' referenced from text segment Does it normally look for ___main? I always thought it was just _main, or __main. Never seen it use three _'s for main before. -------------------------------------------------------------------------- Jason K. Fritcher Sr. Technical Support fritcher@calweb.com Calweb Internet Services http://www.calweb.com/ 916-641-9320 -------------------------------------------------------------------------- Bits/KeyID Date Fingerprint 2048/C6663B59 1997/07/11 D3678FFC53D4EA7E 19329F41812F0F58 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message