home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!elroy.jpl.nasa.gov!ames!agate!forney.berkeley.edu!jbuck
- From: jbuck@forney.berkeley.edu (Joe Buck)
- Newsgroups: gnu.g++.help
- Subject: Re: g++ executable size
- Date: 29 Jul 1992 20:05:01 GMT
- Organization: U. C. Berkeley
- Lines: 21
- Message-ID: <156tldINNqad@agate.berkeley.edu>
- References: <EB.92Jul29092745@ascent.ascent.com>
- NNTP-Posting-Host: forney.berkeley.edu
-
- 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
-