Subject: Re: SymCache optimization (was Re: New ld.elf_so from FreeBSD)
To: Charles Hannum <abuse@spamalicious.com>
From: Matt Thomas <matt@3am-software.com>
List: tech-toolchain
Date: 09/05/2002 18:53:43
At 02:39 PM 9/5/2002, Charles Hannum wrote:

>Actually, there is another solution for C++ startup performance:
>Solaris's `-z combreloc'.  It appears that BFD already sorts
>relocations by symbol, so the only support necessary for this is in
>ld.elf_so.  I've checked in some changes, for i386, `#ifdef
>COMBRELOC', that implement this.  You can see that it's trivial.

I don't see that.  From libstdc++.so via readelf -a:

   001495a0  00020 
R_SPARC_64            0000000000149548  cout                      + 0
   001495d8  00020 
R_SPARC_64            00000000001495d8  cin                       + 10
   001495e8  00020 
R_SPARC_64            0000000000149ae0  _IO_stdin_buf             + 0
   001495f0  00020 
R_SPARC_64            0000000000149548  cout                      + 0
   00149630  00020 
R_SPARC_64            0000000000149630  clog                      + 8
   00149638  00020 
R_SPARC_64            0000000000149c10  _IO_stderr_buf            + 0
   00149640  00020 
R_SPARC_64            0000000000149548  cout                      + 0

Notice that cout is not in adjacent reloc.

-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt/
Cupertino, CA             Disclaimer: I avow all knowledge of this message