This is the mail archive of the gcc-patches@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: .ident & company (was Re: Basic block profiler out of libgcc)


On Mon, May 07, 2001 at 06:35:44PM -0400, Phil Edwards wrote:
> On Mon, May 07, 2001 at 12:50:12PM +0200, Hans-Peter Nilsson wrote:
> > >  So I left it in.
> > > The space issue should be solved by Jakub's string-merging patch
> > > (automatically applied to .comment section, if I read it correctly).
> > 
> > Which requires binutils from CVS, assuming Jakub's patches have
> > been committed now.
> 
> They must not have, or maybe they don't work on .comment.

I don't follow binutils, but I certainly thought Jakub said they'd act
on .comment.  (And if not, it should be a trivial addition.)

> Using today's
> CVS sources for gcc and binutils, .ident is still accumulating quite a bit:
> 
> 31% cd ~/build/install-2001-05-07/lib
> 32% ls -lF libstdc++.so.3.0.0 libgcc_s.so.0
> -rw-r--r--    1 pme      pme        207434 May  7 19:27 libgcc_s.so.0
> -rwxr-xr-x    1 pme      pme       3753280 May  7 19:28 libstdc++.so.3.0.0*
> 33%
> 33% ../bin/strip -R .comment libstdc++.so.3.0.0 libgcc_s.so.0
> 34% ls -lF libstdc++.so.3.0.0 libgcc_s.so.0
> -rw-r--r--    1 pme      pme         33988 May  7 19:31 libgcc_s.so.0
> -rwxr-xr-x    1 pme      pme        796944 May  7 19:31 libstdc++.so.3.0.0*
> 35%
> 
> And all this time I thought we were writing bloated code in libstdc++-v3.
> Turns out it's 80% .ident strings!  :-)

Did you strip those binaries first?  80% debug information _including_
.comment I can believe; 80% just .comment, no.

$ size -A libstdc++.so.3.0.0
libstdc++.so.3.0.0  :
section                    size     addr
.hash                     20408      148
.dynsym                   48752    20556
.dynstr                  129601    69308
.gnu.version               6094   198910
.gnu.version_r              128   205004
.rel.data                 13256   205132
.rel.eh_frame             12496   218388
.rel.gcc_except_table       736   230884
.rel.ctors                   16   231620
.rel.got                   2080   231636
.rel.plt                   3416   233716
.init                        37   237132
.plt                       6848   237172
.text                    301456   244032
.fini                        28   545488
.rodata                    8448   545536
.data                     12668   558080
.eh_frame                 70376   570748
.gcc_except_table         10160   641124
.ctors                       16   651284
.dtors                        8   651300
.got                       2760   651308
.dynamic                    176   654068
.sbss                         0   654244
.bss                       3832   654272
.stab                    869820        0
.stabstr                1116789        0
.comment                   1890        0
.note                        40        0
Total                   2642335

> I've been following this thread lately because it raises the same questions
> that storing the command-line options in the .comment or .note sections
> would; see the change-request thread taking place under PR 2678.

If we were to store the command line options, that certainly would
make the .comment section (.note has a defined meaning which is not
that, doesn't it?) a lot bigger...

-- 
zw                       This APT has Super Cow Powers.
                         	-- apt-get 0.5


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