From owner-freebsd-hackers Fri Feb 4 12:26:17 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from meestal.stack.nl (meestal.stack.nl [131.155.140.139]) by builder.freebsd.org (Postfix) with ESMTP id 02A6148CE for ; Fri, 4 Feb 2000 12:26:15 -0800 (PST) Received: from toad.stack.nl (toad.stack.nl [131.155.140.135]) by meestal.stack.nl (Postfix) with ESMTP id 6E3DF10341 for ; Fri, 4 Feb 2000 17:13:24 +0100 (MET) Received: by toad.stack.nl (Postfix, from userid 816) id B2DE396D7; Fri, 4 Feb 2000 17:13:24 +0100 (CET) Subject: how to compile without libc (so not static) To: freebsd-hackers@freebsd.org Date: Fri, 4 Feb 2000 17:13:24 +0100 (CET) X-Mailer: ELM [version 2.4ME+ PL60 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20000204161324.B2DE396D7@toad.stack.nl> From: marcov@stack.nl (Marco van de Voort) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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