On Tue, Nov 05, 2002 at 11:07:02AM -0800, Chad Parry wrote: > I'm seeing an infinite loop that can be traced to a signal handler in the > uthread module. I'm using a snapshot of CURRENT from 2002-01-09. > > Repro: > Write the classic hello world program. When you build it, link in > libc_r. Use a shell script to execute it over and over in a tight > loop. This works on my box (using zsh): > > # echo 'main() { printf("Hello World!\\n"); }' > hello.c > # gcc -o hello hello.c -lc_r
With the -v flag, you find /usr/bin/ld -V -dynamic-linker /usr/libexec/ld-elf.so.1 -o h /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /var/tmp/ccGisSmu.o -lc_r -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o 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. -- Steve To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message