ghfeil@white.toronto.edu (Georg Feil) (12/09/89)
I have a small ANSI C program I'm running on a simple custom 68020 target system. The same program compiles just as easily with g++ as with gcc, but the resulting binary is several times larger: (!) -rwxr-xr-x 1 georg 17374 Dec 8 18:29 test-gcc* -rwxr-xr-x 1 georg 51986 Dec 8 19:02 test-g++* Size is rather of the essence, as the program gets sent to the target system in S-records at 9600 baud. By examining the object file using nm, I discovered large amounts of trash from libg++ being included for no apparent reason. In particular, builtin.cc is a major culprit. It gets included merely to resolve a reference to '__1xyzzy__' from __main(). My question: What exactly is needed from libg++ to link a dead-simple C++ program? In particular, is all the other junk in builtin.cc really necessary, or will it do to put the definition for '__1xyzzy__' in a separate .cc file? Awaiting wisdom from the wizards, Georg. -- Georg Feil Internet: ghfeil@white.toronto.edu -or- : georg@sgl.ists.ca ...if all else fails, try: {uunet,pyramid,watmath,utzoo}!utcsri!white!ghfeil ghfeil%white.toronto.edu@relay.cs.net (ARPA)