🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Ed Barton Wed, 29 Jul 1992 09:27
g++ executable size
#127
Author: Ed Barton
Date: Wed, 29 Jul 1992 09:27
9 lines
809 bytes
As has often been noted, g++ 2.2.2 on the IBM RS/6000 produces
enormous executables.  This appears to result from the generation of
multiple local copies of various method functions.  Are there any
tricks for reducing this effect, such as by turning on some linker
flag in the second link phase only that would allow the linker to
garbage-collect most of the local copies?  Are there any undocumented
flags that allow greater control over the generation of these possibly
duplicated copies, as is possible in many PC products?
Re: g++ executable size
#128
Author: Joe Buck
Date: Wed, 29 Jul 1992 20:05
21 lines
1403 bytes
In article <EB.92Jul29092745@ascent.ascent.com> eb@ascent.com (Ed Barton) writes:
>As has often been noted, g++ 2.2.2 on the IBM RS/6000 produces
>enormous executables.  This appears to result from the generation of
>multiple local copies of various method functions.  Are there any
>tricks for reducing this effect, such as by turning on some linker
>flag in the second link phase only that would allow the linker to
>garbage-collect most of the local copies?  Are there any undocumented
>flags that allow greater control over the generation of these possibly
>duplicated copies, as is possible in many PC products?

Read the "man page", g++.1 in the distribution.  The most effective
technique is to use #pragma interface and #pragma implementation.
This will result, if done right, in only one copy of each class's
virtual function table and only one copy of each inline function that
has to be "outlined".  Their use is explained in the man page.




--
Joe Buck	jbuck@ohm.berkeley.edu
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