Jon Ringle
2009-Jun-30 22:20 UTC
[klibc] multiple definition of `_start' when using -ld with klcc
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
H. Peter Anvin
2009-Jul-01 04:00 UTC
[klibc] multiple definition of `_start' when using -ld with klcc
Jon Ringle wrote:> 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. >You can't do that. It's as simple as that. Sorry. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Maybe Matching Threads
- [klibc:master] klcc: Treat CC, LD, STRIP as multiple words
- [klibc:riscv64-enable-relax] Kbuild, klcc: Support multiple objects in KLIBCCRTSHARED
- [PATCH] klcc --version is -V because -v is --verbose already (unbreak -v)
- [klibc:master] klcc: Remove the need for bash
- [PATCH] klcc compatibility with gcc