This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Duplicated Constants


On Fri, Jul 13, 2001 at 06:15:36PM -0700, Brian Shaft wrote:
> "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?

There is no need to extend anything, recent binutils already support this,
plus there is a gcc patch too, see
http://gcc.gnu.org/ml/gcc-patches/2001-05/msg00253.html
If you need recent patch for GCC 3.0, check
ftp://ftp.redhat.com/redhat/linux/rawhide/SRPMS/SRPMS/gcc3-3.0-3.src.rpm
I'll update that patch for GCC mainline soon and resubmit.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]