Date: Sat, 5 Feb 2000 14:16:00 +0100 From: "Marco van de Voort" <marcov@stack.nl> To: freebsd-hackers@freebsd.org Subject: Re: how to compile without libc (so not static) Message-ID: <20000205131831.9D59F2E802@hermes.tue.nl> In-Reply-To: <20000205013418.A76713@keltia.freenix.fr> References: <20000204161324.B2DE396D7@toad.stack.nl>; from marcov@stack.nl on Fri, Feb 04, 2000 at 05:13:24PM %2B0100
next in thread | previous in thread | raw e-mail | index | archive | help
> According to Marco van de Voort: > > gcc -nostdlib empty.c /usr/lib/crti.o /usr/lib/crt0.o -o empty > > You mean crt1.o instead of crt0.o here right? crt0.o is the a.out version... Yup, my fault. > > grep exit *.o > > nm(1) is your Dear FriendŽ here. Grep and gcc -S also :-) Anyway I manually patched the .s sources, and now I can compile an empty gcc program. Never knew that that was so hard! gcc -nostdlib crt1.o crtbegin.o empty.c crtend.o -o empty was the final commandline I think. I manually patched crt1 to remove the libc init and the (two!) atexit calls. Marco van de Voort (MarcoV@Stack.nl) <http://www.stack.nl/~marcov/xtdlib.htm> 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?20000205131831.9D59F2E802>