[klibc] multiple definition of `_start' when using -ld with klcc

Jon Ringle jon at ringle.org
Tue Jun 30 15:20:17 PDT 2009


Hi,

I am trying to setup an environment where I can build external projects against klibc. It works - except if I have a program that links to libc. Then I get a multiple definition of `_start' message. Here is a simple test case.

Jon

[ringlej at ringlejxbuild ~/temp/klibc-test]$ cat klibc-test.c
#include <stdio.h>

int main(void)
{
        printf("hello world");
}
[ringlej at ringlejxbuild ~/temp/klibc-test]$ CC=klcc LD=klcc LDFLAGS="-lc" make klibc-test
klcc   -lc  klibc-test.c   -o klibc-test
/home/ringlej/WAVE/git/Platform/Volcano/os/ptxdist/isc/platform-ISC/sysroot-target/usr/lib/klibc/lib/libc.so: In function `_start':
bpabi.c:(.text+0x0): multiple definition of `_start'
/home/ringlej/WAVE/git/Platform/Volcano/os/ptxdist/isc/platform-ISC/sysroot-target/usr/lib/klibc/lib/crt0.o:(.text+0x0): first defined here
make: *** [klibc-test] Error 1



More information about the klibc mailing list