Date: Fri, 3 Apr 1998 13:15:27 +1000 (EST) From: John Birrell <jb@cimlogic.com.au> To: fritcher@calweb.com (Jason K. Fritcher) Cc: jb@cimlogic.com.au, hackers@FreeBSD.ORG Subject: Re: pthread question Message-ID: <199804030315.NAA15959@cimlogic.com.au> In-Reply-To: <Pine.BSF.3.95q.980402172341.17926A-100000@web2.calweb.com> from "Jason K. Fritcher" at "Apr 2, 98 05:26:31 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Jason K. Fritcher wrote: > [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. That's because when you use gcc to run ld, it knows to add crt0.o (or scrt0.o) and libgcc (which is where __main lives). When I said that I issue the compile and link commands separately, I should have explained that I still use gcc so that it adds the startfile and standard libraries. -- John Birrell - jb@cimlogic.com.au; jb@freebsd.org CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137 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?199804030315.NAA15959>