linker trouble

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
hanumant
Posts: 21
Joined: Mon Jul 23, 2007 10:16 pm

linker trouble

Post 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
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

LDFLAGS += -nostdlib -nostdinc

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