Page 1 of 1

linker trouble

Posted: Tue Jul 31, 2007 9:42 pm
by hanumant
Hi I followed the guidelines to build a cross compiler. I am using binutils-2.16 and gcc-4.0.2. the installations happened successfully. however when i try compile my kernel , the linker gives the following error

/home/gooner/myos/cross/lib/gcc/i586-elf/4.0.2/../../../../i586-elf/bin/ld: crt0.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make: *** [kernel] Error 1

what do i have to do, i am working on ubuntu. linker command in makefile is

$(CC) $(CFLAGS) -Xlinker -T -Xlinker $^ -o $@

Could someone please give me the steps for resolving this problem .Thank you

Posted: Wed Aug 01, 2007 1:06 am
by JamesM
LDFLAGS += -nostdlib -nostdinc

crt0.o is part of libc. You don't have libc. So it won't compile.