Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHow to resolve this multiple definition problem?
Hi!
I make the kerenel only, it works good. I make the ucd-snmp in user. The follow is the errors it reports: /usr/local/arm_tools/bin/../lib/gcc-lib/arm-elf/3.0/../../../../arm-elf/lib/crt0.o: In function '_start': /usr/local/arm_tools/bin/../lib/gcc-lib/arm-elf/3.0/../../../../arm-elf/lib/crt0.o(.text+0x0): multiple definition of '_start' /usr/local/arm_tools/arm-elf/lib/crt0.o(.text+0x0): first defined here collect2: ld returned 1 exit status in fact: /usr/local/arm_tools/bin/../lib/gcc-lib/arm-elf/3.0/../../../../arm-elf/lib/crt0.o(.text+0x0): multiple definition of '_start' /usr/local/arm_tools/arm-elf/lib/crt0.o(.text+0x0): first defined here , it's just the same file crt0.o Can you help me? Thanks a lot! Regards, Alex.3 Replies
- Altera_Forum
Honored Contributor
up!
Who can help me?Thanks a lot! - Altera_Forum
Honored Contributor
the ld links to wrong crt0 in gcc lib.
The crt0 should be from that of uclibc. Check Rules.mak LDFLAGS := -nostdlib -Wl,-r -Wl,-d -L$(LIBCDIR)/lib $(LIBCDIR)/lib/crt0.o