[pups] Stupid question..

Steven M. Schultz sms at moe.2bsd.com
Tue Jan 16 08:15:45 AEST 2001

Hi -

> From: Martijn van Buul <pino at dohd.org>
> however if I link things manually ("cc -c test.c ; ld -o test test.o -lc")
> I get an unresolved _environ. By some experimentation, I noticed that
> including /lib/crt0.o in the linker helps to some extent - however,
> the binary generated by cc works like a charm, while the manually
> linked version quits with a bus error. Any ideas?

	Try placing /lib/crt0.o before the test.o:

		ld -o test /lib/crt0.o test.o -lc

	on another note it's usually not a good idea to call a program 'test'
	because when you are least expecting it you will end up running
	/bin/test and wonder what is wrong.


More information about the TUHS mailing list