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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to