Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2000 17:13:24 +0100 (CET)
From:      marcov@stack.nl (Marco van de Voort)
To:        freebsd-hackers@freebsd.org
Subject:   how to compile without libc (so not static)
Message-ID:  <20000204161324.B2DE396D7@toad.stack.nl>

next in thread | raw e-mail | index | archive | help

I finished the syscalls, so now I moved on the initialisation code.

To test that I try to create an empty binary, which doesn't link to libc:

I've put in an hour effort, and wrote the following C file:

int main (void) {
 return 0;
}

gcc -nostdlib empty.c /usr/lib/crti.o /usr/lib/crt0.o -o empty

results in:

/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x4f): undefined reference to `atexit'
/usr/lib/crt1.o(.text+0x5c): undefined reference to `atexit'
/usr/lib/crt1.o(.text+0x6f): undefined reference to `exit'

with a 
 
grep exit *.o 

in /usr/lib doesn't find me that label.

What am I missing? 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000204161324.B2DE396D7>