> 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 ([EMAIL PROTECTED])
<http://www.stack.nl/~marcov/xtdlib.htm>
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message