public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Chris Kirby <ckirby@laurelnetworks.com>
To: binutils@sources.redhat.com
Subject: Changing .dynstr to be more C++ friendly?
Date: Thu, 24 Feb 2005 01:11:00 -0000	[thread overview]
Message-ID: <5.1.0.14.0.20050223142247.01c54d50@sherlock> (raw)

We have a large C++ embedded project where we have some large (~7MB) .dynstr sections that are taking up a lot of memory.  I used objdump to dump out all of the dynamic strings, and I noticed two C++ features that contributed to the large string size:
1) namespaces and class names are at the front of the mangled symbol name
2) templates with multiple instantiations

Looking at the strings, I noticed that there are possibilities for compression:
- For functions in the same namespace / class (#1), they tended to have a common prefix.
- For instantiated templates (#2), they tended to end with the same suffix since they implement similar functions.

My thinking was that we could change the definition of an Elf symbol to not contain a single name, but rather N distinct name components (3 in this case).  Using the example above, we could use the first for the prefix, the second for the unique portion, and the third for the suffix.  The hope would be that the prefix and suffix strings would be shared across multiple symbols.

For C++ applications I think the compression possible would be fairly high.  How difficult do you think it would it be to add these additional strings to the elf symbol table entries?

- Chris Kirby 

             reply	other threads:[~2005-02-23 19:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-24  1:11 Chris Kirby [this message]
2005-02-24 13:15 ` MIPS gas doesn't set SH_FLAG Brett Porter
2005-02-28 19:38   ` Nick Clifton
2005-03-01  1:18     ` Eric Christopher
2005-03-01  9:47       ` Nick Clifton
2005-03-01 16:38         ` Brett Porter
2005-03-01 17:27         ` Eric Christopher
2005-02-24 13:58 ` Changing .dynstr to be more C++ friendly? Alan Modra
2005-02-24 17:14   ` Chris Kirby
2005-02-24 17:28     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.0.14.0.20050223142247.01c54d50@sherlock \
    --to=ckirby@laurelnetworks.com \
    --cc=binutils@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).