Thread View: gnu.g++
1 messages
1 total messages
Started by Georg Feil
Sat, 09 Dec 1989 00:37
g++-compiled objects big :-(
Author: Georg Feil
Date: Sat, 09 Dec 1989 00:37
Date: Sat, 09 Dec 1989 00:37
30 lines
1611 bytes
1611 bytes
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)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads