Date: Tue, 5 Nov 2002 12:05:30 -0800 (PST) From: Chad Parry <chad@isilon.com> To: Steve Kargl <sgk@troutmask.apl.washington.edu> Cc: freebsd-current@FreeBSD.ORG Subject: Re: Hello World stuck in infinite loop Message-ID: <Pine.BSF.4.21.0211051158040.60411-100000@isilon.com> In-Reply-To: <20021105194529.GA23849@troutmask.apl.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 5 Nov 2002, Steve Kargl wrote: > What happens if you use > > gcc -v -o hello -pthread hello.c > > /usr/bin/ld -V -dynamic-linker /usr/libexec/ld-elf.so.1 -o h1 /usr/lib/crt1.o > /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /var/tmp/ccjfgwUn.o -lgcc > -lc_r -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o > > Note the order of the libraries. I got the same result. The library order is different, like you said. But libc_r still takes precedence over libc, so the behavior is unchanged. I could solve the problem, of course, by just not linking in the pthreads library. But I have some real-world executables that are vulnerable to this same bug, and they actually need pthreads. So no linker tricks will help me in the end. BTW, I tried to reproduce this bug on a more up-to-date snapshot of current, but I couldn't even build libc_r. Where is the __pselect function (referenced in uthread_pselect.c) defined? -- chad To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0211051158040.60411-100000>