From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14284 invoked by alias); 24 Feb 2005 16:11:54 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 14260 invoked from network); 24 Feb 2005 16:11:49 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 24 Feb 2005 16:11:49 -0000 Received: from drow by nevyn.them.org with local (Exim 4.44 #1 (Debian)) id 1D4LaH-00089K-LD; Thu, 24 Feb 2005 11:11:25 -0500 Date: Thu, 24 Feb 2005 17:28:00 -0000 From: Daniel Jacobowitz To: Chris Kirby Cc: Alan Modra , binutils@sources.redhat.com Subject: Re: Changing .dynstr to be more C++ friendly? Message-ID: <20050224161124.GA31283@nevyn.them.org> Mail-Followup-To: Chris Kirby , Alan Modra , binutils@sources.redhat.com References: <5.1.0.14.0.20050223142247.01c54d50@sherlock> <5.1.0.14.0.20050223142247.01c54d50@sherlock> <5.1.0.14.0.20050224093737.01cf16a0@sherlock> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.0.20050224093737.01cf16a0@sherlock> User-Agent: Mutt/1.5.6+20040907i X-SW-Source: 2005-02/txt/msg00592.txt.bz2 On Thu, Feb 24, 2005 at 09:52:12AM -0500, Chris Kirby wrote: > At 12:17 PM 2/24/2005 +1030, Alan Modra wrote: > >On Wed, Feb 23, 2005 at 02:22:50PM -0500, Chris Kirby wrote: > >> 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). > > > >I think you underestimate the scope of the change you are proposing. > >This would require changes to all consumers of ELF files, which means > >more than just the assembler and linker. Debuggers, ld.so, etc. > > I was hoping that they all used bfd or liberty so we would only have > to change it there. If everyone has there own code to interact with > ELF files, then I agree it would be too large of a change to be > feasible right now. If ELF is ever revised, it would be nice to > consider ways to compress the dynamic strings for languages other > than just C. > > For our embedded application, I am wondering how feasible it would be > to change the symbol names to something shorter. As long as the > application and the shared library are in agreement in what the > symbol names are, it should not matter what they are. This would > allow us to come up with a more compact naming scheme than the > current C++ name mangler. I could imagine a post processing step > after the application and libraries are built where the current names > in use are found, converted to a shorter representation, and then > replaced. I don't know if this will interfere with any of the C++ support library functions, but you can probably make it work. It's not hard to rename symbols in an ELF file. -- Daniel Jacobowitz CodeSourcery, LLC