This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Duplicated Constants
- To: Gcc Gurus <gcc at gcc dot gnu dot org>
- Subject: Duplicated Constants
- From: Brian Shaft <bshaft at cisco dot com>
- Date: Fri, 13 Jul 2001 18:15:36 -0700
"gcc.utils.help" were silent on this. Any interest from the gcc side?
Bfd has infrastructure for re-using constants (e.g. _bfd_stringtab_add) and
seems to make one copy of a constant for each .o file. However when multiple
files are linked together, it appears that there is no further optimization. If
there are lots of files, the final executable often ends up with many copies of
the same constants.
It looks like extending this optimization to ld might buy back some of the
increases in memory usage with the recent gcc compilers - so we (Cisco) are
interested in attempting it. Has anybody been down this path before? Any tips,
warnings, or flames?
Brian Shaft
I have nothing to declare but my identifiers